window.onkeydown = keydown;functionkeydown() {alert("keydown event detected!");}
一般来说利用以上代码及可以实现对keydown的操作