The example of this article is about JS to implement a label hyperlink to submit Form form method. Share to everyone for your reference. The implementation methods are as follows:
<form action= "/home/search" method= "Get" id= "Search_form" >
<div class= "searchbox png" id= "SearchBox" >
<input type= "text" id= "Searchtxt" class= "Searchtxt"
name= "Shopname" value= "@shopName" >
< A class= "searchpic h-submitbtn png" id= "h-submitbtn" onclick= "Document:search_form.submit"
(); " >
</a>
</div>
</form>
Here a tag can be written in the following ways:
Method 1:
Copy Code code as follows:
<a class= "searchpic h-submitbtn png id=" h-submitbtn "onclick=" Document:search_form.submit (); " > Submit </a>
Method 2:
Copy Code code as follows:
<a href= "Javascript:document:search_form.submit ();" > Submit </a>
Method 3:
Copy Code code as follows:
<a class= "searchpic h-submitbtn png" id= "h-submitbtn" onclick= "document.getElementById" (' Search_form '). Submit (); " > Submit </a>
I hope this article will help you with your JavaScript programming.