File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes difference between body onLoad and window.onload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "difference between body onLoad and window.onload " Watch "difference between body onLoad and window.onload " New topic
Author

difference between body onLoad and window.onload

RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
Please tell me this :

Is there any difference between body onLoad and window.onload


Thanks in advance.


If you want something you never had do something which you had never done
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
They both do the same thing. Having onload in the body tag is obtrusive and is normally frowned upon by seasoned developers.

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: difference between body onLoad and window.onload