What is the exact difference between the methods onload() and document? ready()? 

The onload() method is JavaScript when the page finishes loading. The document. a Ready () method is a jQuery method called when the DOM is ready. The main difference is that onload() waits for all assets on the page to be loaded, including images and other external resources, during the document. Ready () only remains for the DOM to be prepared. 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *