onload Event

This topic documents a feature of Binary Behaviors, which are obsolete as of Internet Explorer 10.

Fires from a persistent element when the page reloads.


Event Property object.onload = handler;
attachEvent object.attachEvent( "onload", handler);
Named script <SCRIPT FOR = object EVENT = onload>

Event Information

Bubbles No
Cancels Yes
To invoke Load the persistent Web page from a favorite or shortcut or through an Internet address.
Default action Initiates any action associated with this script. The onload event for behaviors overrides the onload event for DHTML objects.

Event Object Properties

Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query the event object for the following event properties.

Available Properties

srcElement Gets or sets the object that fired the event.

Refer to the specific event object for additional event properties.


This example shows how to use the onload event for a persistence behavior.

<META NAME="save" CONTENT="favorite">
   .saveFavorite {behavior:url(#default#savefavorite);}
   function fnSaveInput(){
   function fnLoadInput(){
      alert("The onload event fired.");
<INPUT class=saveFavorite onsave="fnSaveInput()" onload="fnLoadInput()" 
    type=text id=oPersistInput>

Code example:

Applies To

saveFavorite, saveHistory