Your browser does not support iframes.
[Try it Β»](#) * * Frame/IFrame Object](#)Event Frame Onload
# Frame/IFrame onload Event
[ Frame/IFrame Object](#)
* * *
## Definition and Usage
The onload event is triggered when a frame or iframe finishes loading.
## Syntax
onload="_JavaScriptCode_"
| Parameter | Description |
| :--- | :--- |
| JavaScriptCode | Required. The JavaScript code to execute after the event is triggered. |
* * *
## Browser Support

All major browsers support the onload event.
* * *
## Examples
## Example 1
Display "Frame is loaded" immediately after the frame finishes loading:
function load()
{
alert("Frame is loaded");
}
[Try it Β»](#)
## Example 2
Display "Iframe is loaded" immediately after the iframe finishes loading:
function load()
{
alert("Iframe is loaded");
}
YouTip