本文摘自PHP中文网,作者coldplay.xixi,侵删。
jQuery选择器:1、层次选择器;2、基本过滤器选择器;3、内容过滤器选择器;4、可见性过滤器选择器;5、属性过滤器选择器。

推荐:《jquery视频教程》
jQuery选择器:
1、基本的有id、标签、类、通配符选择器:
2、层次选择器:
1 2 3 4 | ancestor descendant
parent > child
prev + next
prev ~ siblings
|
3、基本过滤器选择器
1 2 3 4 5 6 7 8 9 10 | :first
:last
:not
:even
:odd
:eq
:gt
:lt
:header
:animated
|
4、内容过滤器选择器
1 2 3 4 | :contains
: empty
:has
:parent
|
5、可见性过滤器选择器
6、属性过滤器选择器
1 2 3 4 5 6 7 | [attribute]
[attribute=value]
[attribute!=value]
[attribute^=value]
[attribute$=value]
[attribute*=value]
[attrSel1][attrSel2][attrSelN]
|
7、子元素过滤器选择器
1 2 3 4 | :nth-child
:first-child
:last-child
:only-child
|
8、表单选择器
1 2 3 4 5 6 7 8 9 10 11 | :input
:text
:password
:radio
:checkbox
:submit
:image
:reset
:button
:file
:hidden
|
9、表单过滤器选择器
1 2 3 4 | :enabled
:disabled
:checked
:selected
|
相关免费学习推荐:JavaScript(视频)
以上就是jQuery有哪些选择器的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
如何用jQuery让图片逐渐显示出来
jQuery如何通过文本找到元素
jQuery怎么判断是否为数组?
jQuery怎么判断是否ie浏览器
jQuery load方法加载文档时的中文乱码怎么办
jQuery判断是否存在class的方法
jQuery怎么查询数组中是否有该指定值?
jQuery怎么判断变量是否是数字
jQuery怎么比较两个数字大小
jq如何改变css样式宽度
更多相关阅读请进入《jQuery》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » jQuery有哪些选择器