data property (Internet Explorer)

Switch View :
ScriptFree
data property

[This documentation is preliminary and is subject to change.]

Sets or gets the value of a TextNode object.

Syntax

JavaScript

p = object.data

Property values

Type: String

the value of the TextNode.

Standards information

Examples

This example uses the data property to change the value of a text node.


<SCRIPT>
function fnChangeValue(){
   var oNode = oList.firstChild.childNodes(0);
   var oNewText = document.createTextNode();
   oNewText.data="Create Data";
   oNode.replaceNode(oNewText);
   oNode.data = "New Node Value";
}
</SCRIPT>
<UL ID = oList onclick = "fnChangeValue()">
<LI>Start Here
</UL>

 

 

Build date: 3/8/2012