Answers for "jquery on feom submit"

6

jquery prevent form submit

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

jquery submit form on enter

//jQuery submit form when Enter key is pressed
$("#myInputID").keypress(function (e) {
  if (e.which == 13) { 
    $("#myFormID").submit();
     return false; 
  }
});
Posted by: Guest on August-02-2019

Code answers related to "Javascript"

Browse Popular Code Answers by Language