jquery prevent form submit
//option A
$("form").submit(function(e){
e.preventDefault();
});
jquery prevent form submit
//option A
$("form").submit(function(e){
e.preventDefault();
});
jquery submit form
// It is simply
$('form').submit();
// However, you're most likely wanting to operate on the form data
// So you will have to do something like the following...
$('form').submit(function(e){
// Stop the form submitting
e.preventDefault();
// Do whatever it is you wish to do
//...
// Now submit it
// Don't use $(this).submit() FFS!
// You'll never leave this function & smash the call stack! :D
e.currentTarget.submit();
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us