Home | Mirror | Search | ITEYE 博客 | OSChina 博客 | 51CTO 博客

3.2. DOMDocument

3.2.1. createTextNode



<SCRIPT>
function fnChangeNode(){
   var oTextNode = document.createTextNode("文本节点已创建");
   var oReplaceNode = oSpan.childNodes(0);
   oReplaceNode.replaceNode(oTextNode);
}
</SCRIPT>

<span ID="oSpan" onclick="fnChangeNode()">
点击此处
</span>

comments powered by Disqus