Cara Memeriksa Ruang Tekan Pengguna di JavaScript

document.body.onkeyup = function(e){
    if(e.keyCode == 32){
        //your code
    }
}
Blue-eyed Boar