You're probably looking for confirm(), which displays a prompt and returns true or false based on what the user decided: if (confirm('Are you sure you want to. The confirm() method displays a dialog box with a specified message, along with an OK and a Cancel button. A confirm box confirm(), Yes, Yes, Yes, Yes, Yes. No, using alerts, prompts and confirms are considered disruptive to the user and should be avoided unless you are using them to test. If you want.
Related Videos
JavaScript Tutorial in Hindi Part 15: Confirm Box in JavaScript with yes no option in Hindi Use window. If the user clicks "Cancel", the box returns false. Question feed. New User? Last modified: Aug 22,by MDN contributors.
4 thoughts on “Javascript alert confirmation yes/no”