Answers for "vanilla js prevent form submit"

6

jquery prevent form submit

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

javascript prevent form submit

<form name="foo" onsubmit="return false">
Posted by: Guest on March-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language