查找节点的事件处理程序 [英] Find event handlers for a node

查看:76
本文介绍了查找节点的事件处理程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想暂时挂起节点的click事件。

I want suspend the click event for a node temporarily .

我想获取节点的click事件处理程序并将其分离,然后在需要时重新附加它。

I want to get the click event handler for a node and detach it and then reattach it when I want it again.

我正在使用YUI 3。

I am using YUI 3.

有人可以告诉我如何查询节点的click事件处理程序并将其分离吗?

Can some one tell me how could I query the click event handlers for a node and detach them?

推荐答案

请参阅Y.Event.getListeners- http://yuilibrary.com/yui/docs/api/classes/Event.html#method_getListeners

See Y.Event.getListeners - http://yuilibrary.com/yui/docs/api/classes/Event.html#method_getListeners

有关分离事件的所有各种方式,请参见 http://yuilibrary.com / yui / docs / event /#detach-methods

For all the various ways you can detach events, see http://yuilibrary.com/yui/docs/event/#detach-methods

这篇关于查找节点的事件处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆