li) the direct child node $(#id+img) the img$(#id~[title]) after the id has id basic filter for title attribute $("t"/> li) the direct child node $(#id+img) the img$(#id~[title]) after the id has id basic filter for title attribute $("t">

Home  >  Article  >  Web Front-end  >  What are jquery selectors?

What are jquery selectors?

一个新手
一个新手Original
2017-09-21 10:51:561607browse


Basic Selector

$("pId")id选择器$("a")  
元素选择器$(".class1")  
类选择器$("*")  
所有选择器$("#pId,a,.class2")  ","间隔

Hierarchical Selector

$(.class p)子代
$(.class>li)直接子结点
$(#id+img)id后面的img
$(#id~[title])带有title属性的id

Basic Filter

$("tr:first")tr第一行
$("tr:last")tr最后一行
$("input:not(:chose)")查找所有未选中的input
$("tr:even")奇数行$("tr:odd")偶数行
$("tr:eq(1)")查找tr的第二行
$("tr:qt()")大于索引值
$("tr:lt()")小于索引值
$(":header")选择所有h1,h2,h3一类的header

The above is the detailed content of What are jquery selectors?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn