How to use the confirm() method to display dialog with a message, OK and Cancel buttons in JavaScript

1 Answer

0 votes
if (confirm("Are you sure you want to delete the user?")) 
    document.write("yes");
else
    document.write("no");
 
/*
run:
 
javascript
 
*/

 



answered Jul 22, 2017 by avibootz
...