prompt() displays a dialog box to get to input from the user.
<html>
<head>
<script type="text/javascript">
function info()
{
var m=prompt("Who are you?");
alert("I am "+m);
}
</script>
</head>
<body>
<input type="button" value="Prompt Box" onclick="info()"/>
</body>
</html>
No comments:
Post a Comment