<html>
<body>
<p>Enter names in the fields, then click "Submit" to submit the form:</p>
<form id="frm1" action="https://www.w3schools.com/action_page.php">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br><br>
<input type="button" onclick="myFunction()" value="Submit">
</form>
<script>
function myFunction() {
document.getElementById("frm1").submit();
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_form_submit by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:40:21 GMT -->
</html>