We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13402a5 commit 9e9399cCopy full SHA for 9e9399c
docs/dom/nodelist.md
@@ -2,7 +2,7 @@
2
3
节点都是单个对象,有时需要一种数据结构,能够容纳多个节点。DOM 提供两种节点集合,用于容纳多个节点:`NodeList`和`HTMLCollection`。
4
5
-这两种集合都属于接口规范。许多 DOM 属性和方法,返回的结果是`NodeList`实例或`HTMLCollection`实例。
+这两种集合都属于接口规范。许多 DOM 属性和方法,返回的结果是`NodeList`实例或`HTMLCollection`实例。主要区别是,`NodeList`可以包含各种类型的节点,`HTMLCollection`只能包含 HTML 元素节点。
6
7
## NodeList 接口
8
@@ -11,7 +11,7 @@
11
`NodeList`实例是一个类似数组的对象,它的成员是节点对象。通过以下方法可以得到`NodeList`实例。
12
13
- `Node.childNodes`
14
-- `document.querySelectorAll()`、`document.getElementsByTagName()`等节点搜索方法
+- `document.querySelectorAll()`等节点搜索方法
15
16
```javascript
17
document.body.childNodes instanceof NodeList // true
0 commit comments