How to enable key input?
1 answer
You can have a validate form in submit, which is better anyway:
<form ... onsubmit="return validate()"> <input type="submit" /> </form> You can return false from your validation function to prevent the form from submitting. The form will be checked whether it is submitted via a return key or by pressing a button.
+3