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

Click to Rate and Give Feedback
Methods
 createTextNode Method
createTextNode Method

Creates a text string from the specified value.

Syntax

oTextNode = document.createTextNode( [sText])

Parameters

sText Optional. A String that specifies the nodeValue property of the text node.

Return Value

Returns the created TextNode object.

Example

<SCRIPT>
function fnChangeNode(){
   var oTextNode = document.createTextNode("New Text");
   var oReplaceNode = oSpan.childNodes(0);
   oReplaceNode.replaceNode(oTextNode);
}
</SCRIPT>

<SPAN ID="oSpan" >
Original Text
</SPAN>

Standards Information

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

Applies To

document

See Also

createElement, About the W3C Document Object Model
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