Mozilla.com

  1. MDC
  2. 首页
  3. DOM
  4. element.nodeValue
内容表格
  1. 1. Notes
内容表格
  1. 1. Notes

Notes

对于document nodeValue属性返回null.对于text,comment,和CDATA节点nodeValue属性返回节点的内容.对于节点的属性返回属性的值。

For the document itself, nodeValue returns null. For text, comment, and CDATA nodes, nodeValue returns the content of the node. For attribute nodes, the value of the attribute is returned.

下边的表展示了不同的元素返回不同的值: The following table shows the return values for different elements:

Attr value of attribute
CDATASection content of the CDATA Section
Comment content of the comment
Document null
DocumentFragment null
DocumentType null
Element null
NamedNodeMap null
EntityReference null
Notation null
ProcessingInstruction entire content excluding the target
Text content of the text node

When nodeValue is defined to be null, setting it has no effect.

Page last modified 13:48, 2 Dec 2006 by Xiaobian?

Tags:

文件 (0)