Home >Web Front-end >JS Tutorial >jQuery function

jQuery function

黄舟
黄舟Original
2016-12-15 15:05:141533browse

Form:
1. $(":input") Find all input elements
2. $("text") Match all single-line text boxes
3. $(":passWord") Match all password boxes
4. $("radio") Matches all radio buttons
5, $("checkbox") Matches all checkboxes
6, $("submit") Matches all submit buttons
7, $("image") Matches all images Domain
8, $("button") Matches all buttons
9, $("file") Matches all files Domain

10, $("hidden") Matches all invisible elements, or elements with type hidden

1. $("#id"): Match an element based on the given ID.

2. $("dom element name"): Match all elements based on the given element name

3. $(".Class class name"): Match elements based on the given class.

4. $("*"): Match all elements.

5. $("dom element.class class name"): Select all dom elements whose class attribute is the specified class name.

6. $(".stripe tr"): Get all rows under the table element whose class attribute is stripe

Level:
1. $("ancestor descendant"): Match all under the given ancestor element Descendant elements

2. $("parent > child"): Match all child elements under the given parent element

3. $("PRev + next"): Match all elements immediately after the prev element next element

4. $("prev ~ siblings"): matches all siblings (siblings) elements after the prev element

The above is the content of jQuery. For more related articles, please pay attention to the PHP Chinese website (www.php. cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:jQuery effect usageNext article:jQuery effect usage