preventdefault on submit button code example
Example 1: prevent button from submitting form
function myFunc(e){
e.preventDefault();
}
Example 2: prevent button form submit
<button type="button">Button</button>
Example 3: event preventdefault
event.preventDefault()