In my javascript, I have two elements.
I have logged the two elements and it shows...
Element 1.
Element 2.
There are problem.
When I console.log
the element
s.children
they obviously return some HtmlCollection
s
You will understand what the following means in a minute: But the weird thing is, that one HtmlCollection is empty (and has a length of 0), but has 3 elements (and has a length of 3).
If you read the console.log
s below for the children of the elements, you will understand what I am talking about...
Element 1 children & length:
Element 2 children & length: (the messed up one)
Does anyone have any idea what is going on here?
How do I fix this, I need to loop trough the HtmlCollection, but it won't let me because length is 0...?
Thanks in advance!
All help appreciated.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…