At times we are in situations where we have to programmatically select all fields or only input fields of a form. We can select every field one by one by using element id, class, tag name or other jQuery selectors, but it is a lengthy process.
Suppose we have to disable a form’s elements.
STEP 1:
Disabling all elements including text, hidden, radio, checkbox, submit, textarea, select of form
$(‘form :input’).attr(‘disabled’,’disabled’);
Here i am selecting form by tag ‘