javascript confirm yes no
snippet in javascript

javascript confirm example

user5439

var r = confirm("Are you sure you want to delete?");
if (r == true) {
  //delete
} else {
  //don't delete
}

javascript confirm yes no

user9214

var proceed = confirm("Are you sure you want to proceed?");
if (proceed) {
  //proceed
} else {
  //don't proceed
}

js alert yes no

user7453

if (confirm('Are you sure you want to donate to Andrew Hyder?')) {
  // true (paypal.me/andrewdhyder)
} else {
  // false
}