JavaScript
Article

jQuery Form Selectors

By Sam Deering

Simply a list of useful form selectors when you need to access the elements/attributes in a form such as inputs, text areas, checkbox, submit, button etc…

$(“:input”) All input elements
$(“:text”) All input elements with type=”text”
$(“:password”) All input elements with type=”password”
$(“:radio”) All input elements with type=”radio”
$(“:checkbox”) All input elements with type=”checkbox”
$(“:submit”) All input elements with type=”submit”
$(“:reset”) All input elements with type=”reset”
$(“:button”) All input elements with type=”button”
$(“:image”) All input elements with type=”image”
$(“:file”) All input elements with type=”file”
$(“:enabled”) All enabled input elements
$(“:disabled”) All disabled input elements
$(“:selected”) All selected input elements
$(“:checked”) All checked input elements

No Reader comments

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in JavaScript, once a week, for free.