jquery有几种选择器?

时间:2021-12-28 03:56:08

①.基本选择器:#id,class,element,*;

②.层次选择器:parent > child,prev + next,prev ~ siblings;

③.基本过滤器选择器::first,:last,:not,:even,:odd,:eq,:gt,:lt;

④.内容过滤器选择器::contains,:empty,:has,:parent;

⑤.可见性过滤器选择器::hidden,:visible;

⑥.属性过滤器选择器:[attribute],[attribute=value],[attribute!=value],[attribute^=value],[attribute$=value],[attribute*=value];

⑦.子元素过滤器选择器::nth-child,:first-child,:last-child,:only-child;

⑧.表单选择器::input,:text,:password,:radio,:checkbox,:submit等;

⑨.表单过滤器选择器::enabled,:disabled,:checked,:selected