Wednesday, May 17, 2017

How to define function in java script

<html>
<head>
<script language= "javascript"type="text/javascript">
function displaymessage()
{
alert("hello world")
}
</script>
</head>
<body>
<form>
<input type="button" value="click me" onclick="displaymessage()">
</form>
</body>
</html>

No comments:

Post a Comment