How do I distinguish pressing a button from releasing a button, in JavaScript?

前端 未结 0 479
后悔当初
后悔当初 2020-12-04 03:12

This is what I tried:

function move(e)
{
   if (e.keyCode==32)
   {
     //code
   }
}
function move2(d){
  if (d.keyCode==32)
  {
    //code         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题