event.preventdefault() on form submit code example
Example 1: input submit prevent default
$("#cpa-form").submit(function(e){
return false;
});
Example 2: javascript do not submit form
alert("hello world");
alert("it is a test");
$("#cpa-form").submit(function(e){
return false;
});
alert("hello world");
alert("it is a test");