How to show delete confirmation message in JavaScript

1 Answer

0 votes
function confirmation(){
    var result = confirm("To delete?");
    if (result) {
        document.write("Start Deleting...");
    }
}
 
 
 
/*
run:
 
Start Deleting...
    
*/
<button onclick="confirmation()">Delete</button>

 



answered Sep 16, 2019 by avibootz

Related questions

...