Is there any difference between body onload() and document.ready() function?
Answer Posted / chaitanya
document.ready() function is different from body onload() function for 2 reasons.
We can have more than one document.ready() function in a page where we can have only one body onload function.
document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the common methods of sending a request to a server.
Difference between javascript and jquery? : jQuery Mobile
Can you please explain the difference between .js and .min.js? : jquery mobile
In what scenarios jQuery can be used?
Can you please explain the difference between javascript and jquery? : jquery mobile
What is the use of serialize method in jQuery?
What are the difference between alert() and confirm()?
How you will use jquery means requirement needed for using jquery.
What are the different types of selectors?
What does dollar sign mean in jquery? : jQuery Mobile
Explain jquery.noconflict? : jquery mobile
What is a cdn? What are the advantages of using cdn?
Can you please explain the difference between event.preventdefault and "return false"? : jquery mobile
Can you give me a brief history of your programming days? Where did it all start?
How does jquery mobile theming work? : jquery mobile