Check if the radio button is changed by the keyboard or mouse

后端 未结 6 1996
遇见更好的自我
遇见更好的自我 2021-01-15 08:14

Is possible to tell how a radio button was selected, i.e. if the user used the keyboard or the mouse to click the radio button?

6条回答
  •  借酒劲吻你
    2021-01-15 09:20

    Here is a pretty good discussion on the Radio buttons Click and Change events.

    One thing you can do is, create a click event handler and set a flag, use it later on a different (callback maybe!) function to identify if the change has been triggered by Keyboard or Mouse Click!

提交回复
热议问题