三、
一份文件就是一顆節點樹
節點型別:元素節點——屬性節點、文字節點
getElementById()返回一個物件,對應一個元素節點
getElementByTagName()返回一個物件陣列,分別對應一個元素節點
getAttribute()
setAttribute()
四、
childNodes
nodeType
nodeValue
firstChild
lastChild
五、
DOM指令碼程式設計習慣
預留後路
分離JS
向後相容性
三、
一份文件就是一顆節點樹
節點型別:元素節點——屬性節點、文字節點
getElementById()返回一個物件,對應一個元素節點
getElementByTagName()返回一個物件陣列,分別對應一個元素節點
getAttribute()
setAttribute()
四、
childNodes
nodeType
nodeValue
firstChild
lastChild
五、
DOM指令碼程式設計習慣
預留後路
分離JS
向後相容性