javascript - After the binding event is created, it is triggered multiple times
PHP中文网
PHP中文网 2017-05-18 11:00:12
0
4
500


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中文网

认证高级PHP讲师

reply all(4)
左手右手慢动作

Just undelete before binding

巴扎黑

Click on the Remove event when I'm thinking

过去多啦不再A梦

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

Peter_Zhu

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!