how to use on submit in javascript code example Example: javascript submit form document.forms["myform"].submit();