Here you can find a number of examples on Java Script.Please find the various kinds of examples listed on the right side of this site. If you don't find anything on Java Script then please write to us or leave a commnet. We are pleased to help and find the solution of your problem.

Javascript: Onload and Onunload Event



<html>
<head>
<title>Onload and Onunload</title>

<script language="javascript">
var username;
function hi()
{
username=prompt("Enter your name","Enter Name");
alert(username + " Welcome to my site");
}
function bye()
{
alert(username + " Thanks for visiting my site");
}
</script>

</head>
<body onload="hi()" onunload="bye()">
</body>
</html>

No comments:

Post a Comment

Google