This event occurs when the web page gets loaded, this event should be typed in body tag of document. |
Example: |
<html>
<head> <title>events </title> </head> <body bgcolor=green text=”white” onload=”wel()”> <marquee direction=up behavior=alternate scrollamount=5 size=0> <h1 align=center> Welcome </h1> </marquee> <script> function wel() { document.bgColor=’yellow’ document.fgColor=’blue’ } </script> </body> </html> |