I have a form with two text boxes, one select drop down and one radio button. When the enter key is pressed, I want
form
Use both event.which and event.keyCode:
event.which
event.keyCode
function (event) { if (event.which == 13 || event.keyCode == 13) { //code to execute here return false; } return true; };