Export (0) Print
Expand All

confirm method

Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons.

This method is not supported for Windows Store apps using JavaScript.

Syntax

var retval = window.confirm(message);

Parameters

message [in, optional]

Type: String

String that specifies the message to display in the confirmation dialog box. If no value is provided, the dialog box does not contain a message.

Return value

Type: Boolean

Boolean. Returns one of the following possible values:
Return valueDescription
true

The user clicked the OK button.

false

The user clicked Cancel button.

 

Standards information

There are no standards that apply here.

Remarks

The title bar of the confirmation dialog box cannot be changed.

See also

window
Reference
alert
prompt

 

 

Show:
© 2014 Microsoft