1 ready event: when the DOM is ready, you can query, bind a function to be executed when the manipulation. It can greatly improve the response speed of the web application.
2 onload event: js method in all elements of the page, the picture is fully loaded before executing this event handler is relatively slow.