js preventdefault
function(event) {
event.preventDefault();
}
js preventdefault
function(event) {
event.preventDefault();
}
form input prevent default
const inputElement = document.getElementById('inputButton')
inputElement.onclick = (e) => {
e.preventDefault()
}
prevent form submission on onsubmit function calls
returning false here won't be executed and the form will be submitted either way. You should also call preventDefault to prevent the default form action for Ajax form submissions.
function mySubmitFunction(e) {
e.preventDefault();
someBug();
return false;
}
Get more references : https://stackoverflow.com/questions/3350247/how-to-prevent-form-from-being-submitted
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