You need to select form elements based on their types (hidden, text, checkbox, etc.).
jQuery gives us a bunch of useful filters for this very purpose, as shown in Table (jQuery form filters).
Table : jQuery form filters
So, as an example, if you needed to select all text inputs, you would simply do this:
There is also an :input filter that selects all input, text area, button, and select elements.
Note that the :hidden filter, as discussed earlier, does not test for the type hidden; it works by checking the computed height of the element. This works with input elements of the type hidden because they, like other hidden elements, have an off set Height of zero.
As with all selectors, you can mix and match as desired:
These filters can also be used with regular CSS syntax. For example, selecting all text
input elements plus all <textarea>elements can be done in the following way:
J Query Related Interview Questions
|HTML 4 Interview Questions||HTML Interview Questions|
|HTML 5 Interview Questions||Zend Interview Questions|
|JqueryUI Interview Questions||Dynamic HTML Interview Questions|
|XQuery Interview Questions||jQuery Mobile Interview Questions|
J Query Related Practice Tests
|HTML 4 Practice Tests||HTML Practice Tests|
|HTML 5 Practice Tests||Zend Practice Tests|
|PHP and Jquery Practice Tests||J Query Practice Tests|
|CodeIgniter Practice Tests||Dynamic HTML Practice Tests|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.