提一个JQuery变量和dom变量的问题

erichua 2009-01-21
谁可以告诉我
var $this=$(this);
其中this $(this) $this 三者之间的区别?

10个回复后公布答案
erichua 2009-01-28
一个回答的都没有,答案不公布了。  
wind13 2009-02-26
$this 应该是个变量吧,不过这样命名还是不太好,Javascript特别是Jquery里不习惯这样命名变量。

this 则是指当前对象,如当前DOM对象,或function(){}等。

$(this)则是Jquery封装后的对象,即Jquery对象。
Global site tag (gtag.js) - Google Analytics