Confirmation box in Javascript with Yes No options

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>

 

Anu

Do you have any queries?

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