Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Confirm Delete with javascript (See related posts)

// confirm() returns true or false
// submit() is only called on true and submits the form

   1  
   2  <h1>Howto Confirm Delete</h1>
   3  <form action="delete.html" method="post">
   4  <input type="button" onclick="if (confirm('sure?')) submit();" value="delete">
   5  </form>

You need to create an account or log in to post comments to this site.


Click here to browse all 5350 code snippets

Related Posts