?????塢???y????ι??(level)??????????
?????????parentNode????
????????childNodes?????  firstChild() ?? lastChild()
??????????????previousSibling????
??????????????nextSibling????
????1??????????
????tabNode = document.getElementById("tableid1");
????node = tabNode.parentNode;
????2?????????
????var nodes = tabNode.childNodes;
???????1?????<table>?????л????????汾??IE?????????? “??????”#text??????汾IE????????-----??????<table>??????????????
????2???????<table>?????<tr>????м???????????????<tbody>???----?????
????3??????????
????node = tabNode.previousSibling.previousSibling ‘????????
????msgbox node.nodeName ‘div
????node = tabNode.nextSibling.nextSibling;’????????
????msgbox node.nodeName ‘dl
????????DOM?е??Щ????
????1?????????????
????function createAndAdd1(){
????‘1????createTextNode()??????????????
????oTextNode = document.createTextNode("?μ??????????");
????‘2???div????
????divNode = document.getElementById("div1");
????‘3??oTextNode????div????????
????divNode.appendChild(oTextNode);
????end
????2?????????????
????function createAndAdd2()
????‘1????createElement()??????????????
????oBtnNode = document.createElement("input")
????oBtnNode.type="button"
????oBtnNode.value="???????"
????‘2???div????
????divNode = document.getElementById("div1")
????‘3??oTextNode????div????????
????divNode.appendChild(oBtnNode)
????end
????3?????????????????е?????????innerHTML-----???????????????е?“html????”?????????????????????????
????function createAndAdd3()
????divNode = document.getElementById("div1");
????‘divNode.innerHTML="<input type='button' value='????°??'/> "
????divNode.innerHTML="<a href='http:’www.sina.com'>?????????</a> "
????end
????4???????? ???????????????е?removeChild()??removeNode()??????????????????----?????????
????function deleteNode()
????oDivNode = document.getElementById("div2")
????‘????----??????
????‘oDivNode.removeNode();’???false?????????????
????‘oDivNode.removeNode(true);’true???????????
????‘???????????????????
????oDivNode.parentNode.removeChild(oDivNode)
????end
????5???滻???(????滻) ???????????????е?replaceChild()??replaceNode()??????滻?????????滻???----?????????
????function updateNode()
????oDivNode = document.getElementById("div2")
????oDivNode4 = document.getElementById("div4")
????‘????----??????
????‘oDivNode.replaceNode(oDivNode4)
????‘??????????滻??????????oDivNode4??滻oDivNode
????oDivNode.parentNode.replaceChild(oDivNode4??oDivNode)
????end
????6???滻???(????滻)
????function updateNode2()
????oDivNode = document.getElementById("div2")
????oDivNode4 = document.getElementById("div4")
????oDivNode4_2 = oDivNode4.cloneNode(true);’?????????????????false???????true??????????????
????‘??????????滻??????????oDivNode4_2??滻oDivNode
????oDivNode.parentNode.replaceChild(oDivNode4_2??oDivNode)
????end