html on submit javascript fucntion code example Example: javascript submit a form document.getElementById("myFormID").submit();