confirm

The confirm JS Prompts displays a modal OK/Cancel prompt with the given message, waits for the user to dismiss it, and returns true if the user clicks OK and false if the user clicks Cancel.

Syntax

result = window.confirm(message)

Parameters

message

A string to display in the prompt.

Examples

1 · void

2 · message

alert

prompt

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu