The example in this article describes the usage of jQuery form field attribute filter. Share it with everyone for your reference. The specific analysis is as follows:
The form contains a variety of form fields. You can use the form field attribute selector to get the selected radio buttons, check boxes and list items. You can also find the form from the document based on whether it is available. domain.
1. :checked selector
Used to select all selected form fields. Format:
2. :enabled selector
is used to select all available form fields, format:
3. :disabled selector
is used to select all disabled form fields, format:
4. :selected selector
is used to select all selected option elements from the list box, format:
5. :hidden selector
Used to select all invisible elements
6. :visible selector
Used to select all visible elements
Simple example:
Checkbox: | The selected checkbox The checked checkbox No checkbox selected |
Available text boxes: | |
Unavailable text box: | |
Drop-down list | |
Rendering:
I hope this article will be helpful to everyone’s jQuery programming.