| document.forms[0].submit(); | Usually, a submit button (<input type="submit" />) or a submit image (<input type="image" />) is used to send form data to the web server. However, JavaScript is capable of submitting a form as well, using the form's submit() method. This allows programmers to use an HTML link, for instance, to submit a form, providing more flexibility from a designer's point of view. However, do keep in mind that the following code works only when JavaScript is activated: Submitting a Form (submit.html)| <form> <input type="hidden" name="field" value="data" /> </form> <a href="javascript:document.forms[0].submit();"> Submit form</a> | |