Call a function in hyperlink
|
|
<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>
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
|