Frame/IFrame onload Event
Frame/IFrame Object
Definition and Usage
The onload event is triggered after a frame or iframe finishes loading.
Syntax
onload="
JavaScriptCode
"
| Parameters | Description |
|---|---|
| JavaScriptCode | Required. The JavaScript code executed after the event is triggered. |
Browser support





All major browsers support the onload event
Example
Example 1
Pop up "Frame is loaded" immediately after the frame finishes loading:
Try it »
Example 2
Pop up "Iframe is loaded" immediately after the iframe finishes loading:
Try it »
Frame/IFrame Object