1、基本选择器:#id 、element 、.class 、* 、selector1,selector2,selectorN
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 、:hidden9、表单过滤器选择器:enabled 、:disabled 、:checked 、:selected
"
如何学好jQuery选择器?
首先不知道为啥要学jquery?jquery在react、vue、angular的时代已经用的很少了、前端这样、后端也这样!我们团队很多前端页面都是交给后端同学去写的、前端提供react基建即可、当然复杂页面除外。惊奇的发现后端同学也写的挺好、效率也还不错、特别是结合很多成熟的前端框架、一切都很祥和。
如果题主确实想学jQuery选择器也不是不可以、在百度搜关键字“高山上的鱼 CSDN”、里面有我以前学习jquery时候啃的源码、几乎每一行代码都有比较详细的论述。不过jquery选择器底层是基于sizzle的、其实还是比较复杂的。
反正学习技术没有什么捷径可走、多看源码、多吸收源码中的设计、不仅可提升基础能力、对于后续更高层次的架构设计也是锦上添花!
从哪里开始学习jQuery?
按这个顺序学习
jQuery教程http://codingdict.com/article/7359
jQuery简介
jQuery入门
jQuery语法
jQuery选择器
jQuery事件
jQuery隐藏和显示
jQuery渐入渐出
jQuery 滑动
jQuery动画
jQuery停止
jQuery 回调
jQuery方法链
jQuery dom_get
jQuery dom_set
jQuery dom_add
jQuery dom_remove
jQuery CSS类
jQuery css()方法
jQuery尺寸
jQuery 遍历
jQuery遍历父元素
jQuery遍历子元素
jQuery遍历兄弟元素
jQuery缩小遍历范围
jQuery ajax 简介
jQuery ajax_load
jQuery ajax_get_post
jQuery noConflict() 方法