how to prevent default form submit javascript code example
Example 1: javascript prevent form submit
<form name="foo" onsubmit="return false">
Example 2: input submit prevent default
$("#cpa-form").submit(function(e){
return false;
});
<form name="foo" onsubmit="return false">
$("#cpa-form").submit(function(e){
return false;
});