`
a19905522
  • 浏览: 95224 次
  • 性别: Icon_minigender_1
  • 来自: 郑州
社区版块
存档分类
最新评论

JQ选择器-知识总结

    博客分类:
  • JS
阅读更多
【层级选择器】
(se1 se2): 匹配se1所有的后代元素
 
(parent>child): 仅仅匹配子元素,且只有一级;
 
(prev+next): 匹配所有跟在prev后面的元素,(是同辈关系,且在第一个元素后面)
 
(prev~sib):  匹配与它同辈的元素,(是同辈关系,不管在后面或在前面都匹配)
 
【简单过滤选择器】
first()或 :first 
last()或 :last
:not(selector)
:even
:odd
:eq(index)
:gt(index)
:lt(index)
:header
:animated
 
【内容过滤选择器】
:contains(text) 
:empty
:has(selector)
:parents
 
【可见性过滤选择器】
:hidden
:visible
 
【属性过滤选择器】
[attribute]
[attribute=value]
[attribute!=value]
[attribute^=value]
[attribute$=value]
[attribute*=value]
[selector1][selector2][selectorN]
 
【子元素过滤选择器】
:nth-child(eq|even|odd|index)
:first-child
:last-child
:only-child
 
【表单对象属性过滤选择器】
:enabled
:disabled
:checked       获取表单中所有被选中的元素
:selected      获取表单中所有被选中的option元素
 
【表单对象选择器语法】
:input
:text
:password
:radio
:checkbox
:submit
:imgage
:reset
:button
:file
 
 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics