HBCMS更多的中文手册参考:

createTextNode Method

DHTML文档教程

Creates a text string from the specified value.

dhtml语法

oTextNode = document.createTextNode( [sText])

Parameters

sText Optional. Stringthat specifies the nodevalue property of the text node.

return value

returnsthe created textnode object.

dhtml代码范例

<SCRIPT>
function fnChangeNode(){
var oTextNode = document.createTextNode("New Text");
var oReplaceNode = oSpan.childNodes(0);
oReplaceNode.replaceNode(oTextNode);
}
</SCRIPT>
<SPAN ID="oSpan" onclick="fnChangeNode()">
Original Text
</SPAN>

是否符合公共标准

This method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

document

更多语法参考

createelement, About the W3C Document Object Model