May 27, 2021 XML DOM
This section describes the XML DOM -Comment object.
The following example uses the XML
file .xml.
External JavaScript is
used to load XML files.
CreateComment() - Create a comment node
The Comment object represents the contents of the comment node in the document.
属性 | 描述 |
---|---|
data | 设置或返回此节点的文本。 |
length | 返回此节点的文本的长度。 |
方法 | 描述 |
---|---|
appendData() | 向节点追加数据。 |
deleteData() | 从节点删除数据。 |
insertData() | 向节点中插入数据。 |
replaceData() | 替换节点中的数据。 |
substringData() | 从节点中提取数据。 |