sje*_*397 140
$(document).keypress(function(e) {
if(e.which == 13) {
// enter pressed
}
});
Run Code Online (Sandbox Code Playgroud)
can*_*noe 28
按下某个键时会触发keydown事件.
当按下某个键并且该键通常产生一个字符值时,会触发按键事件.
$(document).keydown( function(event) {
if (event.which === 13) {
// login code here
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
54408 次 |
| 最近记录: |