Creates a text string from the specified value. dhtml语法 oTextNode = document.createTextNode( [sText]) Parameters
return value
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> 是否符合公共标准
Applies To
更多语法参考 createelement, About the W3C Document Object Model |