Home >Web Front-end >JS Tutorial >jQuery form field selector usage analysis_jquery

jQuery form field selector usage analysis_jquery

WBOY
WBOYOriginal
2016-05-16 16:14:511224browse

This article analyzes the usage of jQuery form field selector with examples. Share it with everyone for your reference. The details are as follows:

Form fields refer to the input, textarea, select and button elements in web pages.

1. :input selector

Copy code The code is as follows:
$(":input")

2. :text selector

Copy code The code is as follows:
$(":text")

3. :password selector

Copy code The code is as follows:
$(":password")

4. :radio selector

Copy code The code is as follows:
$(":radio")

5. :checkbox selector

Copy code The code is as follows:
$(":checkbox")

6. :file selector

Copy code The code is as follows:
$(":file")

7. :image selector

Copy code The code is as follows:
$(":image")

8. :hidden selector

Copy code The code is as follows:
$(":hidden")
is used to select all invisible elements ( css display attribute value is none) and hidden field ()

9. :submit selector

Copy code The code is as follows:
$(":submit")

10. :reset selector

Copy code The code is as follows:
$(":reset")

Simple example:

Copy code The code is as follows:
 
 
 
 
表单域选择器 
 
 
 
 
 
   
   
     
     
     
     
   
   
     
     
     
     
   
   
     
     
     
     
   
   
     
     
     
     
   
   
     
     
     
     
   
   



文本框密码框
单选按钮复选框
图像文件域
隐藏域(不可见)下拉列表
提交按钮重置按钮
Text area:


The rendering is as follows:

I hope this article will be helpful to everyone’s jQuery programming.

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