JavaScript-tips
时间:2015-06-30 10:06:09
收藏:0
阅读:187
getElementsByTagName(“x”)
xx.getAttribute(“y”) //xx元素的y属性
xx.lastChild.nodeValue //获得xx的文本内容
document.createElement(“xx”) //创建xx元素
document.createTextNode(“blala”) 建立一段孤立的文本内容
x.appendChild(y) //把y赋给x当儿子属性
document.body.appendChild(y) //把y赋给body
原文:http://www.cnblogs.com/xiaoshan-coding/p/4609529.html
评论(0)