This article is In Progress.
Needs Summary: This article does not have a summary. Summaries give a brief overview of the topic and are automatically included on some listing pages that link to this article.
The following example shows how to declare an onload event for a document that is designed to work with multiple browsers and earlier versions of Internet Explorer.
The client loads applications, embedded objects, and images as soon as it encounters the applet, embed, and img objects during parsing. Consequently, the onload event for these objects occurs before the client parses any subsequent objects. To ensure that an event handler receives the onload event for these objects, place the script object that defines the event handler before the object and use the onload attribute in the object to set the handler. The onload attribute of the body object sets an onload event handler for the window. This technique of calling the window onload event through the body object is overridden by any other means of invoking the window onload event, provided the handlers are in the same script language. Loads the object for which the event is specified. To invoke this event, do one of the following:
- Open a document to invoke this event for the document or any object within it.
The pEvtObj parameter is required for the following interfaces:
- HTML 4.01 Specification, Section 18.2.3
Event handler parameters
- pEvtObj [in]
- Type: IHTMLEventObj
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]