how to use preventdefault in form submission javascript code example Example: input submit prevent default $("#cpa-form").submit(function(e){ return false; });