Are the values returned by Javascript’s getElementsByName(…) guaranteed to be in the same order that they appear in the DOM?
Are the values returned by Javascript’s getElementsByName(…) guaranteed to be in the same order
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.
with
getElementsByName(name),the name is required, and thus the name order is irrelevent.EDIT: I checked the specification and see nothing that would guarantee the order but I have never seen it OUT of order myself.
Spec: http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-71555259