JAVASCRIPT PROGRAM TO GET USER NAME USING PROMPT DIALOG BOX AND PRINT IT

<html>
<head>
<script language="javascript">
function getvalue()
{
var v;
v=prompt("Enter your Name:");
document.write("You have entered:       "+v);
}
</script>
</head>
<body>
<p align="center">Click the following button to see the result</p>
<form>
<input type="button" value="Click me" onclick="getvalue()">
</form>
</body>
</html>

No comments:

Post a Comment