JavaScript button onclick not working

前端 未结 5 857
无人及你
无人及你 2021-01-07 07:57



        
5条回答
  •  爱一瞬间的悲伤
    2021-01-07 08:14

    Ran into this problem myself so I can confirm something's not right. The difference is that I am generating the DOm Element at runtime. Replacing onclick with onmousedown seemed to do the trick if you can't find a place to addEventListener in your code.

提交回复
热议问题