Javascript Confirm Delete

Use a javascript confirm box to ask the user if they want to delete

function confirmDelete(delUrl) {
  if (confirm("Are you sure you want to delete")) {
    document.location = delUrl;

<a href="javascript:confirmDelete('')">Delete</a>
Another way

<a href="" onclick="return confirm('Are you sure you want to delete?')">Delete</a>

javascript confirm alert

Back To Top
© 1998 - 2018 | My3C's

Version 7.2 | Advertise on this site