# 元素修改
# 创建
// 元素节点
let div = document.createElement('div');
// 文本节点
let textNode = document.createTextNode('Here I am');
# 插入
node.append(...nodes or strings)—— 在node末尾 插入节点或字符串,node.prepend(...nodes or strings)—— 在node开头 插入节点或字符串,node.before(...nodes or strings)—— 在node前面 插入节点或字符串,node.after(...nodes or strings)—— 在node后面 插入节点或字符串,node.replaceWith(...nodes or strings)—— 将node替换为给定的节点或字符串。
# DocumentFragment
← 元素节点