JAVASCRIPT

 Home  Computers & Internet  Web Programming JAVASCRIPT
What is Javascript?
Javascript Placement
Syntax
Reserved Words
Variables
Data Types
Escaping Characters
Concatenation
Arithmetic Operators
Assignment Operators
Comparison Operators
Boolean Operators
Conditional Operator
If Statements
Else If Statements
If Else Statements
Switch Statements
While Loops
For Loops
Do While Loops
Break Statement
Continue Statement
prompt()
alert()
Date()
Event Handlers
String Object Methods
Math Object Methods
Window Object Methods
Arrays

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:

onunload
onclick
ondblclick
onmousedown
onmouseup
onmouseover
onmousemove
onmouseout
onkeypress
onkeydown
onkeyup
onfocus
onblur
onsubmit
onreset
onselect
onchange


Home | Privacy Policy | Terms Of Use | Contact Us