Jquery里面的$(this)和this的区别
来源:互联网 发布:音频剪辑 知乎 编辑:程序博客网 时间:2024/06/15 13:52
$(this)和this:
当你用的是Jquery时,就用$(this),如果是js,就用this。
$(this)是jquery对象,this就是简单指当前元素。jquery对象不能直接指定元素的属性(ele.style),需要get(index)或者直接(index)取得对象中元素才行 JQuery中的 $() 这个符号,实际上这个符号在JQuery中相当于JQuery(),即$(this)=jquery(this);也就是说,这样可以返回一个jquery对象。那么,当你在网页中alert($('#id'));时,会弹出一个[object Object ],这个object对象,也就是jquery对象了。
更多详见:
http://www.cnblogs.com/diantao/p/4514238.html
阅读全文
0 0
- jquery里面的$(this) 和this区别
- Jquery里面的$(this)和this的区别
- Jquery里面的this
- JQuery 中this 和 $(this) 的区别
- JQuery -- this 和 $(this) 的区别
- JQuery this 和 $(this) 的区别
- JQuery -- this 和 $(this) 的区别
- JQuery -- this 和 $(this) 的区别
- JQuery -- this 和 $(this) 的区别
- JQuery -- this 和 $(this) 的区别
- JQuery -- this 和 $(this) 的区别
- JQuery -- this 和 $(this) 的区别
- jquery $(this)和this的区别
- JQuery -- this 和 $(this) 的区别
- jquery中$this和$(this)的区别
- jquery中this 和 $this 的区别
- JQuery -- this 和 $(this) 的区别
- JQuery中$(this)和this的区别
- Java基础(十)
- 程序员七夕如何表白:朕只爱一个皇后!(单例模式)
- spring笔记7-在web中加入Spring
- 让你的Python代码拥有类型提示
- 用python生成词云
- Jquery里面的$(this)和this的区别
- android Service简介备忘
- eclipse打不开的常见错误
- System memory 249364480 must be at least 471859200
- iOS视频播放横竖屏切换技巧
- 【python2】正则表达式-中文标点
- MySQL主从复制与读写分离
- Redis集群的操作
- java设计模式之抽象工厂模式