- appendChild(节点)-添加
let oul = document.getElementsByTagName("ul")[0]; |
- insertBefore(要插入的节点,参照点)-插入
let oul = document.getElementsByTagName("ul")[0]; |
- replaceChild(要插入的节点,参照点)-替换
let oul = document.getElementsByTagName("ul")[0]; |
- removerChild(要删除的节点)-删除
let oul = document.getElementsByTagName("ul")[0]; |
- cloneNode(flag)-复制
let oul = document.getElementsByTagName("ul")[0]; |