jquery中的this与$(this)
来源:互联网 发布:lol数据受损 编辑:程序博客网 时间:2024/03/28 20:31
<!DOCTYPE html><html><head><script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script><script>$(document).ready(function(){ $("p").click(function(){ console.log(this); console.log($(this)); });});</script></head><body><p>点我!</p></body></html>结果为:
可以看出在jquery中:this是触发事件的标签的HTML,而$(this)指向的是jquery封装后的dom对象,还可以使用js原生的一些操作
0 0
- 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】Jquery中的this与$(this)
- JQuery中的this和$(this)
- jquery中的this和$(this)
- jquery中的this和$(this)
- jQuery中的this用法
- AIDL(进程间通信)
- sencha touch 创建app后,修改启动画面
- 如何编写高效的手持设备程序代码
- Day 6:在 Java 虚拟机上使用 Grails 进行快速 Web 开发
- Android地图开发中的地理编码与地理反编码
- jquery中的this与$(this)
- 对Android中Tab的使用总结
- 关于移动设备上的一些按键值及其对应的事件
- 关于使用phpMyAdmin进行可视化操作Mysql数据库
- Web工程手动部署到Tomcat下的方法
- Eclipse调试常用技巧
- 如何获得谷歌地图开发密钥
- 4.使用Maven的其他问题
- pip代理的使用方法