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

Asked: Apr 14, 2023

In a page, we can have only one onload function but we can have more than one document.ready function. Document.ready function is called when DOM is loaded but onload function is called when DOM and images are loaded on the page.

Asked by brijesh

Answers (0)

No answers yet. Be the first to answer!