标签:first tee split dev att new nod create value
var elemet = document.createElement("p");
var attr=document.createAttribute("align");
attr.value="left";
elemet.setAttributeNode(attr);
var textNode=document.createTextNode("Hello World");
elemet.appendChild(textNode);
document.body.appendChild(elemet);
var newNode=elemet.firstChild.splitText(5);
alert(elemet.firstChild.nodeValue);
标签:first tee split dev att new nod create value
原文地址:http://www.cnblogs.com/huchaoheng/p/6103612.html