jquery element get

Source: Internet
Author: User
Tags tag name

Preface: This is the category of the blog, jquery is the beginning of the search .
Because checking the manual is too cumbersome, and sometimes you need to drill down into the detail page of the command to see what the purpose of this command is.
Write this article is to, work encountered problems, a look at these articles can find out which command is exactly in line with the role, and then go into the manual for specific learning usage.
The writing is often used, provided you have a certain understanding of the jquery command and a jquery handbook.

Chapter One: jquery elements get common usage

1. Get elements using tag name$ ("label name")
2. Get elements by ID$ ("#id_name")
3. Get elements by class name$ (". ClassName")
4. Get multiple elements at once$ ("element name, element name, element name ....")
5. Get elements by specifying hierarchical relationships$ ("Descendants of Ancestors")$ ("Parent > Child")$ ("front + after")$ ("Brother ~ brother")
6. Get the element based on the attribute value of the element[attribute][attribute = value][Attribute! = value][attribute ^= value][attribute $= value][attribute *= value]
7. Get the element through the filter$ ("element name: Filter")
filter List: First: Last: Not (filter): Even: Odd: eq (index): LT (index): GT (Index): Header: Animated: Contains (text): Empty: Has (selector):p Arent "Note: This is to get a non-empty element that is not a parent element"
8. Get TABLE Element$ (": Form filter Name")
ways to get form elements: Input: Text:p Assword: Radio: CheckBox: Submit: Image: Reset: Button: FileNote: The form label is also the label, can also be used to obtain the label name, but some types of labels can be added to filter to distinguish. such as: $ ("Input:text") "
9, through the filter to obtain the table cell element: Enable to get an element of the input state:d isabled to get an element that is not in the input state: Checked gets the element of the selected element: Selected Gets the element of the selected state in the drop-down box
10. Get the element from the collection element by specifying the ordinal$ ("element name"). EQ (index)
11. Get elements that match the specified conditions$ ("element name"). Filter (expr)
12. Gets the element of the specified range$ ("element name"). Slice (Start,[end])
13. Get elements that are consistent with conditional expressions$ ("element name"). Is (expr)
14. Gets the next element of the element$ ("element name"). Next ([expr])
15. Get the previous element of an element$ ("element name"). Prev ([expr])
16. Get the parent element of the element$ ("element name"). Parent ([expr])
17. Get child elements of an element$ ("element name"). Children ([expr])

jquery element get

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.