Form Selectors


SelectorExampleDescription
:input$(":input")Selects all input, textarea, select and button elements (basically selects all form controls).
:text$(":text")Selects all input elements with type="text".
:password$(":password")Selects all input elements with type="password".
:radio$(":radio")Selects all input elements with type="radio".
:checkbox$(":checkbox")Selects all input elements with type="checkbox".
:button$(":button")Selects all input and button elements with type="button".
:submit$(":submit")Selects all input and button elements with type="submit".
:reset$(":reset")Selects all input and button elements with type="reset".
:image$(":image")Selects all input elements with type="image".
:file$(":file")Selects all input elements with type="file".
:enabled$(":enabled")Selects all elements that are enabled.
:disabled$(":disabled")Selects all elements that are disabled.
:selected$(":selected")Selects all elements that are selected, only works for <option> elements.
:checked$(":checked")Selects all elements that are checked or selected, works for checkboxes, radio buttons, and select elements.
:focus$(":focus")Selects element if it is currently focused.

Leave a Reply

Your email address will not be published. Required fields are marked *