All Tech Tips |
|||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
TextNode ObjectRepresents a string of text as a node in the document hierarchy. Members Table
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 Internet Explorer 5. 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>
Standards Information This object is defined in HTML 3.2 . |
|||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
|
Copyright © 2006 alltechtips.com. All rights reserved.
This website and the materials and information you find on this website are provided "as is", without warranty of any kind, either express or implied, including without limitation any warranty for information, services, or products provided through or in connection with the service and any implied warranties of merchantability, fitness for a particular purpose, expectation of privacy or non-infringement.
|
|||||||||||||||||||||||||||||||||