www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
Properties
 data Property
data Property

Sets or gets the value of a TextNode object.

Syntax

[ sData = ] TextNode.data

Possible Values

sDataString that specifies or receives the value of the TextNode.

The property is read/write. The property has no default value.

Example

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

<SCRIPT>
function fnChangeValue(){
   var 
   var 
   oNewText.data="Create Data";
   oNode.replaceNode(oNewText);
   oNode.data = "New Node Value";
}
</SCRIPT>

<UL ID = oList >
<LI>Start Here
</UL>

Standards Information

This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 World Wide Web link.

Applies To

TextNode
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG