JavaScript

Saturday April 5, 2025
updated: April 10, 2002

 
Home
Getting Started
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Resources
Credits

 

 



Lesson 7 Example 2: OnLoad call alert Function

The Functions are called by placing the following Event Handlers and functions in the body tag:

<Body onLoad="Hello()" onUnLoad="goodbye()";>

The code below defines the functions.

<script language="JavaScrip";>
<!--//function hello()
{alert("Welcome to Lesson 7");}
function goodbye()
{alert("Thank you for visiting. Come Back Soon!");}//-->
</script>

back button
next button

© 2002 Tracy Johnson