Forms can be submitted easily in JavaScript by calling the following method:
document.forms[0].submit();
Here, the ‘0’ denotes the index of the form.