Current location - Quotes Website - Personality signature - How does jQuery get the class name?
How does jQuery get the class name?
"1, use the tagname to get the element.

$ (""tagname "")

2. Get elements by ID

$(""#id_name " ")

3. Get the element by the class name.

$ ("".Class name "")

4. Get multiple elements at once.

$ (""element name, element name, element name ... "")

5. Obtain elements by specifying hierarchical relationships.

$ (""ancestors and descendants "")

$ (""parent > child "")

$ (before ""+after "")

$ (""Brother ~ Brother "")

6. Get the element according to its attribute value.

[attribute]

[Attribute = Value]

[attribute! = value]

[Attribute = Value]

[Attribute $ = Value]

[Attribute * = Value] "