
how to use prompt

Javascript prompt() method
The prompt() is a method of the window object. Prompt uses a text field to enter a value. It also has 'OK' and 'CANCEL' buttons.
<html>
<body>
<script language="javascript">
var name;
name = prompt("Please enter you Name"," enter you name");
if(name != " enter you name"){
alert("Welcome " + name + " at roseindia");
}else{
alert("Welcome at roseindia");
}
</script>
</body>
</html>

Thank you very much. you helped me.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.