javascript - jQuery forms submit -


I create this small JS, so I can submit the form with jQuery

  $ ('#submit'). Click (function () {$ ('# addForm'). Submit ();});  

Can I use a simple href link for this?

Something like

  & lt; A href = "javascript: $ ('#addForm') presented () ;." & gt; Link & lt; / A & gt;  

I tried

  & lt; A href = "javascript: document.addForm.submit ();" & Gt; Link & lt; / A & gt;  

but it did not work (by passing other jQuery in this page)

If you want to create JS to submit, then your link does not have a href value:

  & lt; An id = "submit" & gt; ; Link & lt; / A & gt;  

Comments