JavaScript
Article
By Sam Deering

jQuery Form Selectors

By Sam Deering
Help us help you! You'll get a... FREE 6-Month Subscription to SitePoint Premium Plus you'll go in the draw to WIN a new Macbook SitePoint 2017 Survey Yes, let's Do this It only takes 5 min

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

--ADVERTISEMENT--

Login or Create Account to Comment
Login Create Account
Recommended
Sponsors
Get the most important and interesting stories in tech. Straight to your inbox, daily.Is it good?