Javascript Reference
Categories: document

javascript document createTextNode( )

@March 15, 2008, 1:22 a.m.
createTextNode( ) Firefox/Netscape/NN 6 IE 5 Chrome/Safari/DOM 1


Generates in memory an instance of a text node (W3C DOM Text object) whose nodeValue consists of the untagged text content passed as a parameter. A newly created text node is not yet part of the document tree. Append or insert the node into the document tree or document fragment being assembled for later document insertion. This sequence is the W3C DOM approach to generating new content (in place of the innerText convenience property implemented in IE browsers).


A string of characters to be rendered as content when inserted into the document tree.

Returned Value

Text node object reference.

Powered by Linode.