Confirmation Dialog Box in javaScript

Js Confirmation dialog box:

A confirmation dialog box is mostly used to take user's consent's on any option. It displays a dialog box with two buttons:OK and Cancel. If the user clicks on OK button the window method confirm() will return true. If the user clicks on the Cancel button confirm() returns false.

Example:


Result:


Read Also:

  • Alert Dialog box
  • Prompt Dialog Box