submit di un form con richiesta di conferma - jquery


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1.  
  2. <form action="sendordine.php" method="post" id="myform">
  3. <!-- content form -->
  4. <div class="bottone"><a href="javascript:;">Invia l'ordine</a></div>
  5. </form>
  6.  
  7. <script>
  8. $('document').ready(function(){
  9. $('.bottone a').click(function(){
  10. if(confirm('Vuoi procedere con l\'invio dell\'ordine?')){
  11. $("form").submit();
  12. }
  13. });
  14.  
  15. });
  16. </script>
  17. </body>
  18. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.