Differentiate between mouse and keyboard triggering onclick

前端 未结 7 1047
你的背包
你的背包 2020-12-03 13:09

I need to find a way to determine if a link has been activated via a mouse click or a keypress.



        
7条回答
  •  独厮守ぢ
    2020-12-03 14:04

    Handle the mouseup event.
    If you get a click right afterwards, it was probably done with the mouse.

提交回复
热议问题