DOM 方法


document.createElement(tagName)

document.createTextNode(text)
<element>.appendChild(childNode)
<element>.getAttribute(name, value)
<element>.insertBefore(newNode, targetNode)
<element>.removeAttribute(name)
<element>removeChild(childNode)
<element>.replaceChild(newNode, oldNode)
<element>.hasChildnodes()

你可能感兴趣的:(DOM 方法)