1.

Is There Any Difference Between Body Onload() Function Document.ready() Function Used In Jquery?

Answer»

document.ready() function is different from body onload() function due to 2 REASONS.

  1. We can have more than ONE document.ready() function in a page where we can have only one body onload function.
  2. 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.

document.ready() function is different from body onload() function due to 2 reasons.



Discussion

No Comment Found