jQuery: Detecting pressed mouse button during mousemove event

前端 未结 7 1540
心在旅途
心在旅途 2020-11-30 05:22

I tried to detect which mouse button -if any- is the user pressing during a mousemove event under jQuery, but I\'m getting ambiguous results:

no button press         


        
7条回答
  •  没有蜡笔的小新
    2020-11-30 05:54

    jQuery normalizes the which value so it will work across all browsers. I bet if you run your script you will find different e.button values.

提交回复
热议问题