[JQuery]选择器详解
| 示例 | 说明 |
| $(this) | 当前元素 |
| $("p") | 所有<p>元素 |
| $("input") | 所有input元素 |
| $(".intro") | 所有class=“intro” 的元素 |
| $("p.intro") | 所有class="intro" 的<p>元素 |
| $("#intro") | id="intro" 的第一个元素 |
| $("ul > li") | ul下的所有li节点 |
| $("ul li:first") | 每个<ul> 的第一个<li> 元素 |
| $("ul li:first") | 每个<ul> 的最后一个<li> 元素 |
| $("[href$='.jpg']") | 所有带有以".jpg" 结尾的href 属性的属性 |
| $("div#intro .head") | id="intro" 的<div> 元素中的所有class="head" 的元素 |
| $(li[a:contains('Register')]") | 内容包含Register的<a>元素 |
| $("input[@name=bar]") | name是bar的<input>元素 |
| $("input[@type=radio][@checked]") | type是radio的<input>元素 |
| $(“li”).not(“ul”) | li下没有包含ul节点的节点元素 |
| $("span[@id]") | 包含id属性的<span>元素 |
| $("[@id=span1]") | id为span1的节点元素 |
| $(this).find("a") | 当前元素下的 所有a元素 |
[JQuery]选择器详解的更多相关文章
- Jquery 选择器 详解 js 判断字符串是否包含另外一个字符串
Jquery 选择器 详解 在线文档地址:http://tool.oschina.net/apidocs/apidoc?api=jquery 各种在线工具地址:http://www.ostools ...
- jQuery选择器详解
根据所获取页面中元素的不同.可以将jQuery选择器分为:四大类,其中过滤选择器在分为六小类 jQuery选择器 基本选择器 层次选择器 过滤选择器 简单过滤选择器 内容过滤选择器 可见性过滤 ...
- jQuery选择器详解及实例---《转载》
选择器是jQuery最基础的东西,本文中列举的选择器基本上囊括了所有的jQuery选择器,也许各位通过这篇文章能够加深对jQuery选择器的理解,它们本身用法就非常简单,我更希望的是它能够提升个人编写 ...
- jQuery-强大的jQuery选择器 (详解)[转]
1. 基础选择器 Basics 名称 说明 举例 #id 根据元素Id选择 $("divId") 选择ID为divId的元素 element 根据元素的名称选择, $(&quo ...
- Jquery 选择器 详解
在线文档地址:http://tool.oschina.net/apidocs/apidoc?api=jquery 各种在线工具地址:http://www.ostools.net/ 一.基本选择器 $( ...
- [置顶] Jquery学习总结(二) jquery选择器详解
1.基本选择器 l ID 根据元素ID选择 l Elementname 根据元素名称选择 l Classname 根据元素css类名选择 举例: <input type=”text” id=”I ...
- jQuery选择器 (详解)
1. 基础选择器 Basics 名称 说明 举例 #id 根据元素Id选择 $("divId") 选择ID为divId的元素 element 根据元素的名称选择, $(" ...
- [转]jQuery选择器 (详解)
1).基本 #id 根据给定的ID匹配一个元素.例如:$("#id")element 根据给定的元素名匹配所有元素.例如:$("div").class 根据给定 ...
- jQuery.validator 详解二
前言:上一篇详细的介绍了jQuery.validator( 版本v1.13.0 )的验证规则,这一篇重点讲述它的源码结构,及如何来对元素进行验证,错误消息提示的内部实现 一.插件结构(组织方式) 在讲 ...
随机推荐
- android开发 Fragment嵌套调用常见错误
在activity中有时须要嵌套调用fragment,但嵌套调用往往带来视图的显示与预期的不一样或是fragment的切换有问题.在使用时要注意几点: 1.fragment中嵌套fragment,子f ...
- flash builder 4.7 debug via usb device iPhone 4s - device not found
http://forums.adobe.com/message/4865192 Please provide more info on the above issue: 1.What is the m ...
- perl dtrace2
http://search.cpan.org/~chrisa/Devel-DTrace-Provider-1.11/lib/Devel/DTrace/Provider.pm
- careercup-C和C++ 13.6
13.6 基类的析构函数为何要声明为virtual? 解答: 用对象指针来调用一个函数,有以下两种情况: 如果是虚函数,会调用派生类中的版本. 如果是非虚函数,会调用指针所指类型的实现版本. 析构函数 ...
- mysql distinct跟group by性能
mysql distinct和group by性能 1,测试前的准备 //准备一张测试表 mysql> CREATE TABLE `test_test` ( -> `id` int ...
- rust haskell
http://www.rust-lang.org <null>
- debian 开启SSH
1.修改sshd_config文件,命令为:vi /etc/ssh/sshd_config 2.将#PasswordAuthentication no的注释去掉,并且将NO修改为YES //我的ka ...
- c数组和指针的理解
#include<stdio.h> int main(void) { ,,,,}; ); printf(,*(p-)); // ] = &a; √ // ] = a; × // ] ...
- angularjs Failed to read the 'selectionStart' property from 'HTMLInputElement':
在找angularjs input(type='number')在获取焦点的时候,文本框内容选中效果,参考了:Select text on input focus,我直接复制他的code之后,在ion ...
- Thinkphp twig
参考链接:thinkphp的twig模板实现 使用composer安裝好Thinkphp 3.2.3 composer create-project topthink/thinkphp your-pr ...