ZVON > References > DOM2 Reference

createTextNode (method )

Owning interface and usage:  
Document.createTextNode(data)

Member of these other interfaces:  
none

Description:  
Creates a Text node given the specified string.

Parameters:  
DOMString data  -  The data for the node.

Returns:  
Text -  The new Text object.

Exceptions:  
none


Example:
JavaScript:
  var elem = document.createTextNode('This is some text.');
  var output = elem.nodeValue;
Output:
desired your browser
This is some text.