$("div").keydown(function(event) { var keyCode = event.keyCode; //根据keycode判断按下的是哪个键 }); 转载于:https://www.cnblogs.com/3box/p/5537960.html