Like Console application in Dot net,we can use the same thing with the help of Prompt in Javascript.Prompt means asking a user to enter something in the input box.
We can understand it by an example:-
Make a Javascript function as below:-
<script type="text/javascript">
function prompt_alert() {
var value = "";
var name = prompt("Please enter your name", "Nayab");
if (name != null) {
value = name;
alert(value);
}
}
</script>
So,it's easy to understand about Prompt.
No comments:
Post a Comment