javascript submit button code example
Example 1: submit button
<button type="submit" form="form1" value="Submit">Submit</button>
Example 2: javascript submit a form
document.getElementById("myFormID").submit();
Example 3: javascript submit form
document.getElementById("myForm").submit();
Example 4: javascript onclick button
var button = document.querySelector('button');
button.onclick = function() {
//do stuff
}
Example 5: how to submit a form in js
document.forms["myform"].submit();