How do you refer to elements of array in Jquery? For instance – input type of text with name=”a[]” attribute.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can select them with an attribute-equals selector on the
nameattribute, like this:This will get you all elements, if you want one at a specific index as a jQuery object use
.eq(), or as a DOM element use.get(), like this: