HTMLFormElement.submit() method submits the form. This method does something similar to activating a submit button of the form.
The form's onsubmit event handler (for example,
onsubmit="return false;") will not be triggered when invoking this method from Gecko-based applications. In general, it is not guaranteed to be invoked by HTML user agents.
If a form control (such as a submit button) has a name or id of
submit it will mask the form's submit method.