TextNode Object
Represents a string of text as a node in the document hierarchy.
Remarks
Use the createTextNode method to create a TextNode object. Once you create the TextNode, you can add to it using the appendChild, replaceNode, or insertBefore methods.
This object is available in script as of Microsoft® Internet Explorer 5.
Members
Example
This example uses the TextNode object to change the text of an LI object.
<SCRIPT> function fnChangeText(){ var oTextNode = document.createTextNode("New List Item 1"); var oReplaceNode = oItem1.firstChild.replaceNode(oTextNode); } </SCRIPT> <UL onclick = "fnChangeText()"> <LI ID = oItem1>List Item 1 </UL>
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.