| ★ wanayoo — archive 1999 http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/TextNode.asp | Nouvelle recherche | Portail wanayoo |
![]() |
![]() |
All Products | Support | Search | microsoft.com Home |
![]() | ||
| Home | Magazines | Libraries | Developer Centers | Resources | Downloads | Search MSDN | ||
|
||||||||||
| ||||||||||
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>
| Back to top |
| Did you find this topic useful? Suggestions for other topics? Write us! |
| © 2000 Microsoft Corporation. All rights reserved. Terms of use. |