<script> document.onkeydown = function(event){ let e = event || window.event || arguments.callee.caller.arguments[0] if(e && e.keyCode == 27){ // 按Esc console.log(e.keyCode); } } </script>
<script> document.onkeydown = function(event){ let e = event || window.event || arguments.callee.caller.arguments[0] if(e && e.keyCode == 27){ // 按Esc console.log(e.keyCode); } } </script>
转载于:https://www.cnblogs.com/ron123/p/8710008.html