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