---
title: "Difference between onload() and document.ready()"  
description: "Difference between onload() and document.ready()"  
author: "Anonymous User"  
published: 2012-12-04  
updated: 2012-12-04  
canonical: https://www.mindstick.com/forum/481/difference-between-onload-and-document-ready  
category: "jquery"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# Difference between onload() and document.ready()

Hi every one,\
can you tell me what are [difference](https://www.mindstick.com/articles/157114/good-news-or-bad-news-and-the-difference-is) between onload() and document.ready() [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) used in jQuery?\
\
Thanks

## Replies

### Reply by AVADHESH PATEL

Hi Jayprakash,\
Your solution is

1-We can add more than one document.ready() function in a page.

2-we can have only one onload function.

3-Document.ready() function is called as soon as DOM is loaded.

4-body.onload() function is called when everything (DOM, images..)gets loaded on the page.


---

Original Source: https://www.mindstick.com/forum/481/difference-between-onload-and-document-ready

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
