document.addEventListener('keydown',test); function test(e){ var x=e.keyCode; if(x == 49){ console.log("hello"); } }
转载于:https://www.cnblogs.com/sherlock-merlin/p/9303703.html
document.addEventListener('keydown',test); function test(e){ var x=e.keyCode; if(x == 49){ console.log("hello"); } }
转载于:https://www.cnblogs.com/sherlock-merlin/p/9303703.html