$(document).keyup(function(event){ if(event.keyCode == 13){ onLogin(); } }) 转载于:https://www.cnblogs.com/88phper/p/7878018.html