代码如下: function bind() { document.onkeydown = event => { if (!event) return; var code = event.keyCode || ''; if (!{'37': 1, '38': 1, '39': 1, '40': 1}[code]) return; event.preventDefault && event.preventDefault(); //TODO: ...