javascript form on submit get input value code example
Example 1: javascript prevent form submit
<form name="foo" onsubmit="return false">
Example 2: javascript submit form
document.getElementById("myForm").submit();
<form name="foo" onsubmit="return false">
document.getElementById("myForm").submit();