Answers for "form submitting on button click"

0

prevent button from submitting form

function myFunc(e){
       e.preventDefault();
}
Posted by: Guest on June-24-2020
0

html submit form onclick

var form = document.getElementById("form-id");

document.getElementById("your-id").addEventListener("click", function () {
  form.submit();
});
Posted by: Guest on July-08-2020
2

prevent button form submit

<button type="button">Button</button>
Posted by: Guest on July-09-2020

Code answers related to "form submitting on button click"

Browse Popular Code Answers by Language