in JavaScript by
Q:
How to submit a form using JavaScript by clicking a link?

1 Answer

0 votes
by

Let's see the JavaScript code to submit the form by clicking the link.

  1. <form name="myform" action="index.php">  
  2. Search: <input type='text' name='query' />  
  3. <a href="javascript: submitform()">Search</a>  
  4. </form>  
  5. <script type="text/javascript">  
  6. function submitform()  
  7. {  
  8.   document.myform.submit();  
  9. }  
  10. </script>  

Related questions and answers

0 votes
asked Mar 22, 2021 in JavaScript by Robindeniel
0 votes
asked Mar 6 in Vue.JS by sharadyadav1986
+1 vote
asked Jan 10, 2021 in JavaScript by rajeshsharma
...