Javascript confirmation dialog box

The Javascript confirmation dialog box is used to display a message to the user to confirm something. Note: Confirmation dialog box gives two buttons “OK” and “Cancel”. The confirm() method returns true if the OK button is clicked else returns false. Example: <!DOCTYPE html> <html> <body> <script> function getConfirmation(){ var retVal = confirm(“Do you want … Read more