开发者

How to remove the handler in javascript

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜