Home  >  Article  >  Web Front-end  >  What form selectors does jquery have?

What form selectors does jquery have?

青灯夜游
青灯夜游Original
2020-11-17 09:42:023626browse

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")  //匹配<form>标记中所有input元素,需要注意,在form和:之间有一个空格

:button

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

Example :

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

:checkbox

Description: Match all checkboxes

Example:

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

:file

Description: Match all file fields

Example:

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

: hidden

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

Example:

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

: image

Description: Match all image fields

Example:

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

:password

Description: Match all password fields

Example:

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

:radio

Description: Match all single Select button

Example:

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

:reset

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

Example:

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

:submit

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

of ="submit" Example:

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

:text

Description: Match all single-line text boxes

Example:

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

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!

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