更新时间:2023-12-02 23:53:28
document.body.onkeyup = function(e){ if(e.keyCode == 32){ //your code } }
这将在您按下空格键后执行.
This will be executed after you hit spacebar.
JSFiddle .
按下空格键后执行JS代码