Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • HTML onload event

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 154
    Comment on it

    This event is fired when an object has been loaded. This event is used mostly with the body element to execute a script, after the page loaded all content (including images, script files, CSS files, etc.), this event will be fired. It also help users to deal with the cookies.

    <element onload="script">

    Attribute value :
    script : This script will be run on onloaded.
    Example :
    HTML Code :

    <body onload="onloadFunction()">
    <h1>Hello World!</h1>

    javascript code :

    function onloadFunction() {
        alert("Page is loaded");

    Output :
    Alert-box will pop-up with message "Page is loaded"

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: