delete confirmation in php or javascript

here are two ways:

1, use javascript
<a href=”javascript:if(confirm(‘delete it?’)) location=’xx.php?'”> DELETE </a>  
 2, use php
<a href=”delete.php?id=xxx” onclick=”return window.confirm(‘Delete it?’);”>DELETE</a>

I tried both. They all work on both IE and firefox browser.

Leave a Reply

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