Using event.which to verify if the user pressed the spacebar doesn't work in Firefox

后端 未结 4 601
粉色の甜心
粉色の甜心 2021-01-06 07:59

I want a script to verify if the key pressed is \'spacebar\', keycode 32. I noticed that IE uses other function names.

I tried a lot of solutions found here and this

4条回答
  •  独厮守ぢ
    2021-01-06 08:27

    In principle the way you do it should work. Check this out:

    
    
    
    
    

    It seems that your lack of response is context dependent.

提交回复
热议问题