摘要: insertBefore insertBefore(需要插入的节点,在该节点之前插入)使用需要和 createElement createTextNode getElementById一起使用 <div id="div1"> <p id="p1">这是一个段落。</p> <p id="p2">这是另 阅读全文
posted @ 2021-11-30 13:19 索匣 阅读(65) 评论(0) 推荐(0) 编辑
摘要: js改变其背景颜色 function changeBgClr(value) { document.body.style.backgroundColor=value } this的话还可以调用本身节点的属性 节点的基本操作 var newParagraph = document.createEleme 阅读全文
posted @ 2021-11-30 08:43 索匣 阅读(184) 评论(0) 推荐(0) 编辑