confirm

confirm is a dialog box with a message, an OK button, and a Cancel button.

It displays a message to the screen that needs a yes or no response.

Syntax

result = window.confirm(message);

Example

External

Mozilla Developer Network