Posted By

jachin on 04/18/08


Tagged

form link html anchor submit


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

asifjavedall


submit a form with an anchor tag (link)


 / Published in: JavaScript
 

Name the form what ever you like, but make sure that is reflected in the javascript.

  1. <form id="my_form">
  2. <!-- More HTML -->
  3. <a href="javascript:{}" onclick="document.getElementById('the_form').submit(); return false;">submit</a>
  4. </form>

Report this snippet  

You need to login to post a comment.