JS: Traversing the DOM to push in elements to an array

前端 未结 0 940
一向
一向 2021-02-01 06:44

I\'m trying to traverse the DOM and push all the li nodes to an array but I\'m having a problem with my loop.

Given this piece of html:



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题