One: Find elements
* All elements
Element all elements of the name (P,input)
#id element with the specified ID attribute
. class has all the elements of the specified class attribute
Selector1,selector2 can match elements of multiple selectors
Two: Basic Selector
Div P One element is the descendant of another element
div > P (Parent > Child) An element is a direct sub-node of another element (you can use * after p to specify all child elements of the element)
Div1 + div2 (previous + next) adjacent sibling selector selects only the element immediately following the previous element
DIV1 ~ div2 (previous + siblings) Brother selector selects all sibling elements of the previous element
Three: Basic filter
: Not (selector) all elements except selectors (such as Div:not ("#summary"))
: first removes elements from element one
: The last element of an element is removed
: Even elements with an even number indexed in the selected element
: Odd elements with an odd index number in the selected element
: EQ (Index) The element in the selected element with the index number specified as the number in the parameter
: GT (Index) The element in the selected element that has an index number greater than the number specified in the parameter
: LT (index) the element in the selected element that has an index number less than the number specified in the parameter
Header all
: Animated elements that are being animated
: The element with focus currently focused
IV: Content Filter
: Contains ("Text") contains the elements of the specified text in the argument
: Empty has no child nodes for all elements
: Parent has elements of child nodes (text or child elements)
: Has (selector) contains at least one element that matches the selector (for example, Div:has (p)) matches all DIV elements containing the <p> element
Five: Visibility Filter
: Hidden all hidden elements
: Visible all elements that occupy space in the page layout
Elements that will not be selected include: display:none;height/width:0; ancestor elements are hidden;
Selected elements: visibility:hidden;opacity:0; because they all occupy space in the layout.
VI: Child node filter
: The value in the Nth-child (expr) parameter is an index starting at 1
: First-child The first child node of the currently selected element
: Last-child The last child node of the currently selected element
: Only-child When the element is the only child node in the parent element
Seven: Property filters
[attribute] The element that owns the specified property
[attribute= ' value '] has the specified attribute, and the value is the specified element of merit
[attribute! = ' value ') has the specified attribute, and the value complement specifies that the element is worth
The value of [attribute^= ' value '] property begins with a specific value
Eight: Form selector
: Input all input elements
: text INPUT element of all text types
: password INPUT element for all password types
: Radio all radio buttons
: CheckBox for all check boxes
: Submit all submission Buttons
: Image button for all pictures
: Reset All Resets button
: Button all the <button> elements
: File selector for all files
: Selected All selected list items in the drop-down list
: Enabled all the available form elements
: Disabled all disabled form elements
: Checked all selected radio buttons or checkboxes
jquery Find Element