Frameset onload Event
Frameset Object
Definition and Usage
The onload event is triggered after the page has finished loading.
Syntax
onload="JavaScriptCode"
| Parameters | Description |
|---|---|
| JavaScriptCode | Required. The JavaScript code to execute after the event is triggered. |
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the onload event.
Example
Example
After the frameset has finished loading, an alert pops up saying "Page is loaded":
<html>
<head>
<script>
function load()
{
alert("Page is loaded");
}
</script>
</head>
<frameset onload="load()" cols="50%,50%">
<frame src="frame_a.htm.html">
<frame src="frame_b.htm.html">
</frameset>
</html>
<head>
<script>
function load()
{
alert("Page is loaded");
}
</script>
</head>
<frameset onload="load()" cols="50%,50%">
<frame src="frame_a.htm.html">
<frame src="frame_b.htm.html">
</frameset>
</html>
Try it Yourself »
Frameset Object Other Extensions