The HTML Attribute reference.

"onload" - html Event

  • The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET.

Value(s): One or more script statements each ended with a semicolon.

Event "onload" example:
<html>
  <head>
    <title>ondload Event attribute</title>
  </head>
  <body bgcolor="Silver" text="Blue" 
      onload="alert('page has been loaded')" >
      The onload event occurs when the user agent finishes
      loading a window or all frames within a FRAMESET.
  </body>
</html>
Used in the element(s):
Elements Description
body The <BODY> tag contains the body of the document. It must come after the </'head' > (if a header is specified). Everything between the <BODY> and </BODY> is considered part of the document body. It is the part of the document that is visible to the user.
frameset The element is a frame container for dividing a window into rectangular subspaces called frames.Event, onload, usage:
  • All the frames have been loaded.

© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.