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

XML DOM
DOM 节点
DOM 节点列表
DOM 解析
DOM 遍历节点树
DOM Mozilla 和 IE
DOM 获取节点
DOM 设置节点
DOM 删除节点
DOM 更换节点
DOM 建立节点
DOM 添加节点
DOM 克隆节点
DOM 节点类型
DOM Node
DOM NodeList
DOM NamedNodeMap
DOM Document
DOM DocumentType
DOM ProcessingInstr
DOM Element

XML DOM 中的 DOM Comment


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 488 ::
收藏到网摘: 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

登陆 | 还没注册?