Why onchange fires before onclick in Chrome?

前端 未结 2 2006
栀梦
栀梦 2021-01-14 01:51

I would still take advantage of the expertise and availability of this community.
My question is: why if we have a code similar to



        
相关标签:
2条回答
  • 2021-01-14 02:24

    Because onChange is triggered due to onClick

    0 讨论(0)
  • 2021-01-14 02:32

    One dirty solution might be to use onMouseDown instead of onClick.

    But I'm also wondering why you really need both ;)

    0 讨论(0)
提交回复
热议问题