button onclick function firing twice

后端 未结 7 1572
天涯浪人
天涯浪人 2020-12-08 00:20

I have a button that calls a javascript function using an event handler. For some reason, the event handler is being called twice.

Here is my button (I am using a ph

相关标签:
7条回答
  • 2020-12-08 01:21

    Just for the record in case someone else's having the same problem, I had the same issue, the root cause was that there were 3 buttons with the same ID, after clicking one, the other two also fired their OnClick events...

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