$(this) 和 this 的区别

$(document).ready(function() {
  $("#reset").click(function(){
    $("form").each(function(){
      this.reset();
    })
  })
});
这是Jquery入门教程中的一个例子,自己在录入代码时错把 this 写成了 $(this) 。程序就出错了
经对比发现 this 是DOM元素,而$(this)是Jquery中的一个对象。
应该是这么回事

posted @ 2009-10-22 16:37  LearnPHP  阅读(219)  评论(1编辑  收藏  举报