<html>
<head>
<title>Calling a Function</title>
<script language="javascript" type="text/javascript">
<!--
function greetVisitor()
{
var myName = prompt("Name?", "");
alert("Welcome " + myName + "!")
}
//-->
</script>
</head>
<body>
<h1>Please click below and enter your name when prompted.</h1>
<P><a href="javascript:greetVisitor()">Click for a greeting</a></p>
</body>
</html>