How to submit a form using JavaScript

{0 Comments}

To submit a form using JavaScript there is a JavaScript submit function you can call it on any button link to submit a form using JavaScript.  And you must declare the id of form which you want to submit. 

 Javascript |  copy code |? 
1
<form id="form-id">
2
 
3
  <a href="#" onclick="document.getElementById('form-id').submit();"> submit </a>
4
 
5
</form>
6
 
7

Leave a Comment

Your email address will not be published.