Answers for "execute JS code after pressing space bar"

1

execute JS code after pressing space bar

document.body.onkeyup = function(e){
    if(e.keyCode == 32){
        //your code
    }
}
Posted by: Guest on June-19-2020

Code answers related to "execute JS code after pressing space bar"

Code answers related to "Javascript"

Browse Popular Code Answers by Language