html Node vs Element

* Node vs Element

HTML Document consists of different node, element is one type of node.

* NodeList vs HTMLCollection

NodeList is a collection of node, HTMLCollection is a collection of element.

* HTMLCollection vs NodeList vs Array

HTMLCollection 和 NodeList 都是动态的,会随着 DOM 的变化而变化

Array 是静态的数据结构

About 逸飞

后端工程师

发表评论

电子邮件地址不会被公开。 必填项已用*标注