Filter selector-child element filter Selector

Source: Internet
Author: User

During page developmentHighlight the needs of a specific row. AlthoughBasic filter Selector: Eq (INDEX) can be used to display a single table,It cannot meet the selection needs of a large amount of data and multiple tables. To implement this function, you can useChild element filter SelectorIt is easy to obtain an element specified in all parent elements.

Sub-element filter selector syntax

Selector Function Return Value
: Nth-child (EQ | even | odd | index) ObtainSpecific position element under each parent Element, Index number starts from 1 Element Set
: First-child ObtainThe first child under each parent ElementElement Element Set
: Last-child ObtainThe last child under each parent ElementElement Element Set
: Only-Child ObtainEach parent element has only one child.Element Element Set

Example -- use the jquery sub-element filter selector to select an element

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XMTML 1.0 2 Transitional//EN" 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4 Demo

 

Filter selector-child element filter Selector

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.