这篇文章主要介绍了jQuery中选择器有哪些,具有一定借鉴价值,需要的朋友可以参考下。希望大家阅读完这篇文章后大有收获。下面让小编带着大家一起了解一下。
jQuery选择器:1、层次选择器;2、基本过滤器选择器;3、内容过滤器选择器;4、可见性过滤器选择器;5、属性过滤器选择器。
jQuery选择器:
1、基本的有id、标签、类、通配符选择器:
#id
element
.class
*
2、层次选择器:
ancestor descendant
parent > child
prev + next
prev ~ siblings
3、基本过滤器选择器
:first
:last
:not
:even
:odd
:eq
:gt
:lt
:header
:animated
4、内容过滤器选择器
:contains
:empty
:has
:parent
5、可见性过滤器选择器
:hidden
:visible
6、属性过滤器选择器
[attribute]
[attribute=value]
[attribute!=value]
[attribute^=value]
[attribute$=value]
[attribute*=value]
[attrSel1][attrSel2][attrSelN]
7、子元素过滤器选择器
:nth-child
:first-child
:last-child
:only-child
8、表单选择器
:input
:text
:password
:radio
:checkbox
:submit
:image
:reset
:button
:file
:hidden
9、表单过滤器选择器
:enabled
:disabled
:checked
:selected
感谢你能够认真阅读完这篇文章,希望小编分享jQuery中选择器有哪些内容对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,遇到问题就找亿速云,详细的解决方法等着你来学习!
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。