jquery中的*(通用) 选择器实例
来源:互联网 发布:大连高新达内软件 编辑:程序博客网 时间:2024/05/17 22:05
通用的*选择器,被用来选择所有的元素,任何东西。
例如:
1 $(‘*’) —选择文档中的所有元素。
2 $(‘div > *’) —选择一个div元素下的所有子元素。
一般,单独的使用通过的选择器*是没有任何意义的,最少我不认为存在这样的应用场景。但是它经常需要和其它元素联合,以便形成新的自定义的选择器。
Jquery实例:
<html><head> <title>jquery universal example</title> <script type="text/javascript" src="../jquery-1.11.1.min.js"></script> <style type="text/css"> div{ padding:8px; } </style></head><body><h1>jquery universal example</h1><div class="div-class1"> this is div-class1 <div class="div-class2"> this is div-class2 </div> <div class="div-class3"> this is div-class3 </div></div><br/><br/><button>*</button><button>div > *</button><button id="refresh">Refresh</button><script type="text/javascript"> $("button").click(function(){ var str=$(this).text(); $(str).css("border","1px solid #ff0000"); }); $("#refresh").click(function(){ location.reload(); });</script></body></html>
0 0
- jquery中的*(通用) 选择器实例
- jquery 选择器实例
- jquery选择器所有实例
- jquery选择器实例!
- jquery选择器实例
- jquery选择器实例
- jQuery选择器实例列表
- JQuery中的全选择器(通配符)
- jquery中的层次选择器
- jquery中的基本选择器
- jquery中的表单选择器
- JQuery中的选择器
- jquery中的选择器简介
- jquery中的选择器简介
- Jquery中的选择器
- jQuery中的选择器
- jQuery中的:input选择器
- jQuery中的选择器
- leetcode Subsets
- 地图显示实例
- Spring IOC的原理及详解。
- usb不能正常拔下来
- 左连接、右连接、交叉连接、全外连接
- jquery中的*(通用) 选择器实例
- 启用windows7家庭版的管理员帐号
- 在脚本里判断Gameobject是否被销毁
- ip安全策略的运用
- 【Processing入门】第六七章:函数和数组
- 网络管理员实用命令
- HDU 1025 Constructing Roads In JGShining's Kingdom
- 第9周项目一(do-while语句)
- final关键字之final方法