- Which method cancels the confirmation dialog?
- How to show confirm dialog box in JavaScript?
- How do I select Cancel by default in confirm box?
Which method cancels the confirmation dialog?
The confirm () method uses a window object to invoke a dialogue with a question and two option buttons, OK and Cancel. If the user selects the OK option, it will continue to the function execution; selecting the Cancel option will abort the block code's execution.
How to show confirm dialog box in JavaScript?
The confirm() method is used to display a dialog box with an optional message and two buttons, OK and Cancel. It returns true if the user clicks “OK”, and false otherwise. It prevents the user from accessing other parts of the page until the box is closed.
How do I select Cancel by default in confirm box?
You can't do that, but you could use/write your own dialog which is displayed using DOM elements (like phoenix suggested, it just doesn't have to be that particular jQuery plugin, you could write your own or use plugin from another JS framework). The "use jQuery + plugin X" answers are starting to get annoying.