Online Forum To Support Coders With Technical Assistance - Read Write Execute

How to submit a form on a tag click

Ankit Agrawal
Ankit Agrawal
Published on July 15, 2015 · 1 min read
<form id="myDemoForm" action="" method="post">
<label>Name :</label>
<input type="text" name="name" />
<a href="javascript:void(0);" onclick="document.getElementById('myDemoForm').submit();">Submit Form</a>
</form>
Was this article helpful?
Ankit Agrawal

Ankit Agrawal

Author & Senior Engineer at CodeExecute

Writing practical engineering guides, debugging real-world bottlenecks, and creating free tools for developer productivity.

← Previous Article How to get user details from id in wordpress Next Article → How to call a view without header/footer in cakephp