Home | Top | Free Ajax Editor | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.


createTextNode Method

Creates a text string from the specified value.

Syntax

oTextNode = document .createTextNode( [ sText ] )

Parameters

sText Optional. 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" onclick="fnChangeNode()"> Original Text </SPAN>

Standards Information

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

Applies To

[ Object Name ] Platform Version
Win16:
Win32:
Unix:
Mac:
Windows CE:
 
document
Home | Top | Free Ajax Editor | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.