javascript get form data from submit event code example
Example 1: javascript prevent form submit
<form name="foo" onsubmit="return false">
Example 2: javascript submit form
document.forms["myform"].submit();
<form name="foo" onsubmit="return false">
document.forms["myform"].submit();