【发布时间】:2011-08-15 11:00:54
【问题描述】:
data.target == this 是如何工作的?
jQuery 示例
.mouseup(function(data, handler)
{
if(data.target == this)
{
// some code
}
})
这是否通过比较对象各自的属性来比较对象?
我需要这个检查,因为我希望 mouseup 只在父 div 和一个孩子上。
if (data.target == this || * if this has className XXX * ) {
// some code
}
【问题讨论】:
标签: javascript jquery object compare