|
| JAVASCRIPT ONLOAD EVENT
The javascript onload event handler is used to trigger a script when the page loads. The onload event calls the action from the <body> and <frameset> tags:
Example:
<body onload="document.write('Hello There!');">
The above example will output Hello There! as soon as the page loads.
The onload event can also call a function as follows:
<head>
<script type="text/javascript">
function GreetThem()
{
document.write('Hello There!');
}
</script>
</head>
<body onload="GreetThem();">
See also:
|
|