dom创建新节点的方法
1、//创建一个新节点var pNode= document.createElement("p");
2、//创建文本var pText= document.createTextNode("hello");
3、//将文本添加至创建的P节点中pNode.appendChild(pText);
4、//将pNode节点添加到Body节点中document.body.appendChild(pNode);
5、节点操作方法有,使用方法如上appendChild()removeClild()replaceChild()insertBefore()