开发者

dojo:how to know whether a event handler is bound to a particular dom element

Say for example i have clickHandler a function, then i do

dojo.connect(开发者_如何学JAVAdomEl,'click',clickHandler).

Is there any wayto check whether clickHandler is used as a click event handler for domEl using dojo?


Yes. For example:

var clickHandler = function(evt) {
    var domEl = evt.target;
    // Now domEl is dom node where the click ocurred
    ...
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜