---
title: "Does document.ready() function similar to onload()?"  
description: "Does document.ready() function similar to onload()?"  
author: "Anonymous User"  
published: 2011-10-17  
updated: 2020-09-15  
canonical: https://www.mindstick.com/interview/1300/does-document-ready-function-similar-to-onload  
category: "jquery"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# Does document.ready() function similar to onload()?

Document.ready() function is completely different from body onload() function .

- First of all Document.ready() function is called as soon as DOM is loaded but body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page.
- We can have as many document.ready() functions in a page but onload function is limited on one time.

## Answers

### Answer by Anonymous User

Document.ready() function is completely different from body onload() function .

- First of all Document.ready() function is called as soon as DOM is loaded but body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page.
- We can have as many document.ready() functions in a page but onload function is limited on one time.


---

Original Source: https://www.mindstick.com/interview/1300/does-document-ready-function-similar-to-onload

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
