Replace the text in each text field below with the correct JavaScript object, property, method, function name or comment. Click the test your code! button and see your JavaScript code in action.


<script language = "1 ">

    //The code in the following line will execute
    when the user loads the web page

    2("3 ");

    //The code inside the following function will execute
    when the user clicks the hyperlink below

    function 4 ( ) {

      5("6 ");

<title>JavaScript alert box example</title>

<body bgcolor = "FFFFFF">

    <a href = "JavaScript: 7 ( )">
    Click here to see the alert box</a>



Ask questions & get answers at the JavaScript forum >>

Back to example index

©2000 Joe Sriver,