Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions How to create a confirmation box?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


samar
How to create a confirmation box?
1 Answer(s)      4 years ago
Posted in : JavaScript Questions


How to create a confirmation box?


Advertisement
View Answers

November 10, 2010 at 2:58 PM


Confirm boxes are a convenient way to give a web visitor a simple choice: to accept or to decline something. They are displayed using the JavaScript confirm function.

for example-

confirm("Text or question you want to use");

The code is as -

<script type="text/javascript">
function show(){
var c= confirm("This is the comfirm box");
if(c == true)
{
alert("You select ok");
}
if(c== false)
{
alert("You select cancel");
}
}
</script>


Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com