获取输入的键

1234

获取输入的键
Code表API:https://github.com/lamberta/html5-animation window.addEventListener("keydown",function(event){   switch(event.keyCode)   { case 37:      console.log("您敲下了←键"); break; case 38: console.log("您敲下了↑键"); break; case 39: console.log("您敲下了→键"); break; case 40: console.log("您敲下了↓键"); break; }   },false);
活着最可怕的事情就是停止思考
原文地址:https://www.cnblogs.com/myzsy/p/6098556.html