Answers for "prevent form submit with jquery"

7

jquery prevent form submit

//option A
    $("form").submit(function(e){
        e.preventDefault();
    });
Posted by: Guest on March-31-2020
0

prevent form submit html javascript jquery

// BEST OPTION
	JUST:
* delete the <button></button> in the friggin FORM and add <a></a> with the same style instead, THE FORM WONT BE SUBMITTED THIS WAY. 
* REMOVE THE action="" and method="" tags, and replace them in JQUERY\JS fetch() or $.ajax() functions!

** VOILA **

    //option B
    $("form").submit(function(e){
        e.preventDefault();
    });
Posted by: Guest on December-23-2021

Code answers related to "prevent form submit with jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language