how to submit a form in js

JavaScript
document.getElementById("myFormID").submit();document.getElementById("myForm").submit();document.forms["myform"].submit();

Source

Also in JavaScript: