I have a form on an HTML page with multiple submit buttons that perform different actions. However, when the user is typing a value into a text input and hit enters, the bro
Don't intercept the keydown event, intercept the submit event.
keydown
submit
so:
form.onsubmit = function(e){ // Do stuff. Change the form's action or method maybe. return true; }