Please visit our sponsors !
The confirm() Function
The confirm() function displays a specified message, waits for an answer, and then returns a boolean value depending on which answer the
user selected. If the user selected the ok value the return value is
true, and if the user selected the cancel value the return value is
false.
Syntax
n = Dialogs.confirm(message, ok, cancel) |
Part |
Description |
n |
The Boolean value returned from the function |
message |
A string containing the message |
ok |
A string containing the OK text |
cancel |
A string containing the CANCEL text |
Example
var a = Dialogs.confirm("Exit?","Yes","No");
|
Result
a = true (if "Yes" is selected)
a = false (if "No" is selected)
|
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|