Saturday, 18 October 2014

Call JavaScript Function on Button Click Event

Create a function Named HelloWorld and call that function on button click event
 <html>
<head>
<script type="text/javascript">
<!--
function HelloWorld() {
   alert("Hello World")
}
//-->
</script>
</head>
<body>
<input type="button" onclick="HelloWorld()" value="Click Here" />
</body>
</html>

No comments:

Post a Comment