confirm

confirm displays a prompt with a message, OK, and Cancel and waits for the user to respond.

It returns true if the user clicks OK and false if the user clicks Cancel.

Syntax

result = window.confirm(message)

Examples

empty

message

Internal

alert

prompt

External

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu