DOM 是一棵树(tree),树上有 Node,Node 分为 Document(html)、Element(元素)、 Text(文本)及其它
Node 的接口
1.重要属性
childNodes
firstChild
innerText
lastChild
nextSibling
nodeName
nodeType//重要
nodeValue
outerText
ownerDocument
parentElement
parentNode
previousSibling
textContent
2.重要方法
appendChild()
cloneNode()//重要
contains()
hasChildNodes()
insertBefore()
isEqualNode()
isSameNode()
removeChild()
replaceChild()
normalize() // 常规
Document 接口
1.重要属性
body
characterSet
childElementCount
children
doctype
documentElement
domain
fullscreen
head
hidden
images
links
location
onxxxxxxxxx
origin
plugins
readyState
referrer
scripts
scrollingElement
styleSheets
title
visibilityState
2.重要方法
close()
createDocumentFragment()
createElement()
createTextNode()
execCommand()
exitFullscreen()
getElementById()
getElementsByClassName()
getElementsByName()
getElementsByTagName()
getSelection()
hasFocus()
open()
querySelector()
querySelectorAll()
registerElement()
write()
writeln()
Element 的接口
innerHTML