开发者

How to remove the handler in javascript

开发者 https://www.devze.com 2022-12-18 01:41 出处:网络
I\'m adding some document to addhandler, where this script will execute on each time on ajax call.开发者_StackOverflow

I'm adding some document to addhandler, where this script will execute on each time on ajax call.

开发者_StackOverflow

But on the ajax result how can I remove the handler, where i tried using removeHandler but for the first time its getting affected.

Is any method to check whether the event is alive kill it.


If you want to remove an event handler with Javascript, you need to unsubscribe it this way:

document.getElementById("yourelement").removeEventListener("yourEvent", yourFunction);
0

精彩评论

暂无评论...
验证码 换一张
取 消