javascript confirm yes no

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

Also in JavaScript: