Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js are you sure alert

myFunction() {
     var x;
     if (confirm("Are you sure?") == true) {
         x = "You pressed OK!";
     } else {
         x = "You pressed Cancel!";
     }
     return x; 
}
myFunction();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #alert
ADD COMMENT
Topic
Name
5+5 =