I have various inputs, selects and textareas in a form. I'd like to select one of them based on name without knowing the type of the element with jQuery. I know I can do something like
$("input[name=foo], textarea[name=foo], select[name=foo]")
but I wonder if I can do it in a more concise way. What do you say?
http://api.jquery.com/input-selector/
:input[name=foo]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With