25.306. Window.onload: event handler invoked when a document finishes loadingJavaScript 1.0:25.306.1. SynopsisFunction onload 25.306.2. DescriptionThe onload property of a Window specifies an event handler function that is invoked when a document or frameset is completely loaded into its window or frame. The initial value of this property is a function that contains the semicolon-separated JavaScript statements specified by the onload attribute of the <body> or <frameset> tags. When the onload event handler is invoked, you can be certain that the document has fully loaded, and therefore that all scripts within the document have executed, all functions within scripts are defined, and all document elements have been parsed and are available through the Document object. You can use Window.addEventListener( ) or Window.attachEvent( ) to register multiple event-handler functions for onload events. 25.306.3. See AlsoWindow.onunload; Section 13.5.7, "Manipulating the Document During Loading," Example 17-7, Chapter 17 |