
A simple JavaScript technique to add a confirmation dialog before a delete action is submitted in an HTML form.
The Solution
<form method="post" onsubmit="return (confirm('do you really want to delete this stuff?'));"> <input type="image" name="deleteitem" src="images/x.png"> </form>
and that’s all the trick!
in many cases, you would have more than one input on your form, just use multiple forms like this:
`
`