What is a prompt box?

Ads
 

What is a prompt box?

What is a prompt box?

View Answers

November 8, 2010 at 5:24 PM

The prompt() is a method of the window object, just like alert() we just saw. The format for prompt() is similar to alert(), except for one addition. Prompt uses a text field to enter a value. It also has 'OK' and 'CANCEL' buttons, while the alert has only one button.

<html>
<body>
<script language="javascript">
  var name;
  name = prompt("Pleas enter you Name"," enter you name");
  if(name != " enter you name"){
    alert("Well Come " + name + 
    " at roseindia");
  }else{
    alert("Well Come at roseindia");
  }
</script>
</body>
</html>

Ads









Related Tutorials/Questions & Answers:
What is a prompt box?
What is command prompt in Java?
Advertisements
Prompt
prompt using
using prompt
list boxs
Command Prompt in UI
instead of text boxe i have to show check box as selected.
javascript prompt alert
javascript for prompt - JSP-Servlet
javascript for prompt - JSP-Servlet
javascript for prompt - JSP-Servlet
command prompt is compilation is not working
Command Prompt in UI
How to prompt user
Prompt for a password when deleting a data
run command prompt from jsp program
Excel Prompt User on Focus
javascript for textbox or prompt using servlet - JSP-Servlet
javascript for textbox or prompt using servlet - JSP-Servlet
How to connect to MySQL from command prompt?
Video Tutorial: How to create a database in MySQL using Command prompt?
what is bit
What is procedure
what is hibernate.archive.autodetection
What is JDBC?
What is FBT
What is ActionServlet?
What is Trigger?
What is VLR ?
What's PHP ?

Ads