Form Selectors

Form Selectors in jquery is used to access the form elements more easily and professionally. Following are the properties of the form selectors.

Button: $(":button")

The button selector is used to select all the form elements of input type button.

Submit: $(":submit")

The :submit selector is used to select all form elements of input type submit. Typically applies to all buttons and input elements.

Input: $(":input")

The :input selector is used to select all the form elements of input type input. Typically applies to input, textarea, buttons and form values.

Textbox: $(":text")

The text selector is used to select all form elements of input type text. $(':text') is equivalent to $('[type=text]') and thus selects all form elements of input type text.

Disable: $(":disabled")

The :disabled selector is used to select all form elements of input type disabled.

Enabled: $(":enabled")

The enabled selector is used to select all form elements of input type enabled.

Checked: $(":checked")

The checked selector is used to select only the checked items in a form elements of input type checked.

Selected: $(":selected")

The selected selector is used to select all the form elements of input type selected.




Ask Questions

Ask Question