"2017-6-3" JQuery Selector

Source: Internet
Author: User

Jquery by JS Package of some methods, for us to call, can quickly implement some JS function

jquery is a method package that JS writes

Selector Selector


1. Basic Selector
1.1 Basic
ID Selector $ ("#ID名")
Class Selector $ (". Class name ")
Tag Selector $ (" label name ")

1.2 Combination
Parallel, separated by $ ("#ID名,#ID名")
Descendants are separated by a space of $ (". Class name. Class Name")

2. Filter selector
2.1 Basic Filtration
First $ (". Class name :")
Tail $ (". Class name :last")
equals ( any ) $ (". Class name : EQ (index number)")
greater than $ (". Class name : GT (index number)")
less than $ (". Class name : LT (index number)")
Exclude $ (". Class name : Not ( selector )")
Odd $ (". Class name : Odd")
even ( including index 0) $ (". Class name : Even")

2.2 Attribute Filtering
Property name Filter $ (". Class name : [Property name]")
Filter for the value of the property name $ (". Class name : [Property name = value]")
$ (". Class name : [Property name = = value]")

2.3 Content Filtering
Literal $ (". Class name : Contains (" string ")")
Child element $ (". Class name : Has (" selector ")")

"2017-6-3" JQuery 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.