【发布时间】:2011-06-08 23:27:38
【问题描述】:
有点奇怪。
<table>
<tr>
<td>feng</td>
</tr>
</table>
jQuery 代码:
$('table tr').click(function(e){
console.log($(this)==null); //returns False
});
Chrome 控制台输出False,这是预期的。
但是,当我在函数中切换断点并触发事件时,我发现如果我在 Chrome 控制台中键入$(this),它会返回null
【问题讨论】:
-
你在哪里触发断点?
-
在
console.log($(this)==null);行中
标签: javascript jquery google-chrome console this