Main Page | Session 12 Index | Casting Datatypes | Operator Precedence
The confirm method is similar to the alert method. It displays a message to the user, but provides two buttons (OK and Cancel) instead of one. Confirm returns a value of true if the user selects the "OK" button, or false if the user selects "Cancel".
This value can be used in an if statement to select a course of action.
The following is an example of the code used in the confirm sample document, accessed through this link.
Main Page | Session 12 Index | Casting Datatypes | Operator Precedence