Home > Web Front-end > JS Tutorial > body text

What form selectors does jquery have?

青灯夜游
Release: 2020-11-17 09:42:02
Original
3530 people have browsed it

jquery form selectors include: ":input", ":button", ":checkbox", ":file", ":hidden", ":image", ":password", ":radio" ”, “:reset”, “:submit”, “:text”.

What form selectors does jquery have?

[Related recommendations: jQuery video tutorial]

The form selector matches elements that often appear in the form . But the matching elements are not necessarily in the form

:input

Description: Match all input elements

Example:

$(":input")  //匹配所有input元素
$("form :input")  //匹配
标记中所有input元素,需要注意,在form和:之间有一个空格
Copy after login

:button

Description: Match all ordinary buttons, that is, input elements of type="button"

Example :

$(":button")  //匹配所有的普通按钮
Copy after login

:checkbox

Description: Match all checkboxes

Example:

$(":checkbox")  //匹配所有的复选框
Copy after login

:file

Description: Match all file fields

Example:

$(":file")  //匹配所有的文件域
Copy after login

: hidden

Description: Match all invisible elements, or elements of type hidden

Example:

$(":hidden")  //匹配所有的隐藏域
Copy after login

: image

Description: Match all image fields

Example:

$(":image")  //匹配所有图像域
Copy after login

:password

Description: Match all password fields

Example:

$(":password")  //匹配所有密码域
Copy after login

:radio

Description: Match all single Select button

Example:

$(":radio")  //匹配所有单选按钮
Copy after login

:reset

Description: Match all reset buttons, that is, type=" reset" input element

Example:

$(":reset")  //匹配所有的重置按钮
Copy after login

:submit

Description: Match all submit buttons, that is, type Input element

of ="submit" Example:

$(":submit")  //匹配所有的提交按钮
Copy after login

:text

Description: Match all single-line text boxes

Example:

$(":text")  //匹配所有的单行文本框
Copy after login

For more programming-related knowledge, please visit: Introduction to Programming! !

The above is the detailed content of What form selectors does jquery have?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!