当前位置: 首页 > 网络学院 > XML相关教程 > XML DOM > DOM Comment

XML DOM
DOM Attribute
DOM Text
DOM CDATA
DOM Comment
DOM HttpRequest
DOM ParseError
DOM 校验器
DOM 介绍
DOM 摘要
DOM 案例
DOM 节点树
DOM 访问节点树
DOM 节点信息
DOM 文档执行
DOM 节点导航

XML DOM 中的 DOM Comment


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 487 ::
收藏到网摘: n/a

The Comment object represents the content of comment nodes in a document.
Comment对象代表了文档中注释节点的内容。


Examples
案例

In the examples below, we will use the XML file books.xml, and the JavaScript function loadXMLDoc().
在所有案例中,我们将使用“books.xml”文件以及JavaScript 函数“loadXMLDoc()”

createComment() - Create a comment node
createComment() - 创建一个注释节点


The Comment object
注释对象

The Comment object represents the content of comment nodes in a document.
Comment对象代表了文档中注释节点的内容。

IE: Internet Explorer, F: Firefox[火狐], O: Opera, W3C: World Wide Web Consortium (Internet Standard) | 万维网联盟(国际标准)

Comment Object Properties
注释对象属性

Property
属性
Description
描述
IE F O W3C
data Sets or returns the text of this node
设置或返回一个注释文本
6 1 9 Yes
length Returns the length of the text of this node
以字符的形式返回一个注释节点的文本长度
6 1 9 Yes

Comment Object Methods
注释对象方法

Method
方法
Description
描述
IE F O W3C
appendData() Appends data to the node
在一个注释节点的末尾添加数据
6 1 9 Yes
deleteData() Deletes data from the node
删除一个注释节点中的数据
6 1 9 Yes
insertData() Inserts data into the node
将数据插入注释节点中
6 1 9 Yes
replaceData() Replaces data in the node
替换注释节点中的数据
6 1 9 Yes
substringData() Extracts data from the node
获取文本节点中的数据
6 1 9 Yes

评论 (0) All

登陆 | 还没注册?