Skip to content
KS LIM edited this page Mar 19, 2021 · 1 revision

Dialog

confirm()

  • displays a dialog box with a specified message, along with an OK and a Cancel button.
  • A confirm box is often used if you want the user to verify or accept something.
   var c = confirm("delete it?");
   if(c){
     //delete it
   }else{
     //cancel the action
   }
Clone this wiki locally