confirm method (window)
Displays a confirmation dialog with a message that the user needs to respond to.
The confirmation dialog contains an OK and a Cancel button. Script execution does not continue until the confirm method returns (the user presses the OK or Cancel button or closes the confirmation dialog).
You can find the related objects in the Supported by objects section below.
|Optional. String that specifies the text for the message in the dialog box. Default is an empty string. This parameter is required in Firefox.|
Boolean. One of the following values:
|The confirmation dialog was closed by the Cancel button or by the system Close button.|
|The confirmation dialog was closed by the OK button.|
Example HTML code 1:
This example illustrates the use of the confirm method:
Did you find this example helpful?
User Contributed Comments