JQuery: Keypress enter key

July 11th, 2009 by jeremychone
$("input").keypress(function (e) {
  if (e.which == 13){
     alert("You have pressed Enter");
  }
}

See also:

Leave a Reply