How can I make an <a href="http://test/com/tag/test">Test</a> act like a form button? And by acting like a form button I mean that when clicking the link to do a method="get" or post in order to be able to capture it by get or post.
Not necessary has to be a link, I can adapt in order to make it work like that!
If you want to submit a form using a link:
HTML —
JS —
Docs for
trigger(): http://api.jquery.com/triggerIf you want to submit the form without leaving the page, you can use an AJAX call:
Docs for
$.ajax(): http://api.jquery.com/jquery.ajaxNote that
.on()is new in jQuery 1.7 and in this case is the same as using.bind().