OnKeyDown - Enter
textboxId.onkeydown = function(e) {
if (!e) {
var e = window.event;
} // Enter is pressed
if (e.keyCode == 13) {
submitFunction();
}
}
Written by Otto Vanluchene
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery
Authors
Related Tags
#jquery
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#