search

Home  >  Q&A  >  body text

javascript - After the binding event is created, it is triggered multiple times


I encountered a problem. I chose to delete. When the pop-up window appeared, I chose to think again, and then selected another point to confirm the deletion. , two pieces of data are gone. I think it is because when you click Cancel for the first time, the following monitor was created but not triggered. When you click OK for the second time, the event created for the first time was triggered. What is the solution to this problem? solve?

PHP中文网PHP中文网2749 days ago535

reply all(4)I'll reply

  • ringa_lee

    ringa_lee2017-05-18 11:02:12

    Just undelete before binding

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-18 11:02:12

    Click on the Remove event when I'm thinking

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-18 11:02:12

    I think the _this you passed is wrong, please print _this.attr('dataId'); it is best to look at the tag structure

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-18 11:02:12

    Open f12 and look at the network to see how many requests the frontend has sent to the backend, and observe what their parameters are.

    reply
    0
  • Cancelreply