I have a "login form" that "onkeyup" checks the form and does as asked but I want to disable the enter key entirely so that pressing it has no effect on the form. This is because if I wanted the key to be : "apple" some fast typing users will press enter before the javascript has run for the "checkform". This results in ?userid="apple" in the url and the page refreshing and I dont want that to happen. Any help here?
login form:
<input type="text" style="background-color: black; border-color: black; color: white; width:100%; height:100%; font-family: VT323; font-size: 3EM; " placeholder="my house color" name="userid" onchange="javascript:this.value = this.value.toUpperCase();" autocomplete="off" onkeyup="check(this.form)"/> <br>
current enter key disabler (not working)
$('form input').on('keypress', function(e) {
return e.which !== 13;
});