What options do I have to access the elements of a DOM tree in a For Loop ? And if it’s too difficult can I convert it to an array ?
thanks,
Bruno
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.
Here’s an example on jsfiddle.
If you have any questions, don’t hesitate to ask. XML has a magnificent traversal system, this doesn’t even begin to cut into the raw power of the DOM.
Also, be sure to check w3schools, although it’s not a perfectly reliable source.