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.

 
<html>
<head>

<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 ");
    }
</script>

<title>JavaScript alert box example</title>

</head>
<body bgcolor = "FFFFFF">

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

</body>
</html>

 




Ask questions & get answers at the JavaScript forum >>

Back to example index

©2000 Joe Sriver, www.sriver.com