HTMLFormElement.submit() method submits the form. This method does something similar to activating a submit button of the form.
onsubmit event handler (for example,
onsubmit="return false;") is not triggered when invoking this method from Gecko-based applications. In general, this event handler isn't guaranteed to be invoked by any 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.