Web??????????DOM
???????????? ???????[ 2015/11/19 10:57:20 ] ??????????????? ???
?????塢???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
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Web?????????????????Web????????????????Docker Compose???????Web???????WEB?????ΧС??APP??????WEB????WEB???????????????WEB??????APP?????????Web??????????Web????????????Linux?????′?Java Web???????WEB?????ΧWeb?????Χ???Web??????????????HTTP(1)????Э??Web?????е?A/B?????????????????Web??????????Web??????ò?????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????