How to get all the elements of the current node's child nodes

使用: ParentNode.children;

 

 

note: 

1. Return is a HTMLCollection example;

2. This example is a dynamic set;

3. traversed only for loop, not using forEach ();

4. Return element just a set of child nodes, the other nodes are not included;

Guess you like

Origin www.cnblogs.com/aisowe/p/11528683.html
Recommended