js监听键盘事件
2019-06-13 本文已影响0人
帅的潇洒
document.onkeydown = function(e){
var key = window.event.keyCode;
console.log(key);
// if(key == 13){
// console.log(1);
// }
}
按下抬起时触发
onkeyup