jQuery里面的$("this")和$(this)有什么区别

转自:https://zhidao.baidu.com/question/106330797.html

1、$("this")是使用标签选择器,查找名为this的标签
2、$(this)取出当前对象并转换为jQuery对象
3、$(this)是jquery对象,能调用jquery的方法,例如click(), keyup();而this,则是html元素对象,能调用元素属性,例如this.id,this.value

猜你喜欢

转载自blog.csdn.net/luo4566/article/details/86607091