$(document).key press(function(e) { console.log(e.which);//打印对应的按下去的按键 // 回车键事件 if(e.which == 13) { $('.js-login-button').click(); } });
转载于:https://my.oschina.net/kaiyuanlong/blog/1798681
$(document).key press(function(e) { console.log(e.which);//打印对应的按下去的按键 // 回车键事件 if(e.which == 13) { $('.js-login-button').click(); } });
转载于:https://my.oschina.net/kaiyuanlong/blog/1798681