Document:整个html文件称为一个document文档
Element:所有的标签都是element元素
Attribute:标签里面的属性
Text:标签中夹着的内容为text文本
Node:document、element、attribute、text统称为节点(Node)
Document常用对象方法
getElementById()返回指定ID对象
getElementByName()返回指定名称对象集合
getElementByTagName()返回指定签名对象集合
createTextNode()创建文本节点
createElement()创建元素节点
Element对象
appendChild()向元素添加一个新节点,作为最后一个子节点
firstChild()返回元素首个子节点
getAttribute()返回元素节点的指定属性值
innerHTML()设置或返回元素的内容
insertBefore()在指定节点前插入新节点
Attribute对象
attr.value()设置或返回属性的值