Confirmation box in Javascript with Yes No options

Here is the tutorial which explains how to create the Confirmation box in Javascript with Yes No options.

Create onclick event in html coding:

<a onClick="return verifydelete()" href="viewcustomer.php" class="templatemo-edit-btn">Delete</a>

Javascript coding:

<script type="application/javascript">
function verifydelete()
{
	if(confirm("Are you sure want to delete this record...???") == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>

 

🔥93 Views

Anu

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.