JavaScript Form Submit Example

The code:
<script type="text/javascript">
function submitform()
<form id="myform" action="submit-form.php">
Search: <input type='text' name='query'>
<a href="javascript: submitform()">Submit</a>

Here is the form created by the code above:

Search: Submit

Note: Use Simfatic Forms to create complete web forms quickly without coding. More Info

Back to: How to Submit a Form Using JavaScript