Web??????????DOM
???????????? ???????[ 2015/11/19 10:57:20 ] ??????????????? ???
????DOM -----Document Object Model
???????????????DOM???????????ó?????????????????????????????????????????? ???????? HTML ?? XML ?????? ????????????????????????
??????????? ”????ó??????????????? HTML ?? XML ???????????????????????????????????????????DOM ????????????????? Web ??ó????????????
????Java Applet ?? ActiveX ??????????? ??????? DOM ?淶?? ????? DOM ????????????У?Web??????????????? ???????????????? ????????Web??ó??? ?????????
????HTML DOM
???????DOM????
????1????????????????? JavaScript ??????в????????????????????????????????????????????????????????????·??棺
????1?????? JavaScript ????ο?????????????????????????????????
????2??????????????????????String??Array??Math??Date ???????????
????3???????????window??location??history??navigator ???
????4?????????document??images??form ???
????2??vbs?????????????????
????1?????????????? ??BOM??
???????????????????????????????????????????????????????????????????????
????2???????????? ??DOM??
??????????????????????????????????????? HTML ????????Щ??????????????????????
?????????????????汾?У?????????????????????????????к???????
???????????????
??????????????????????????????????????????е?????????(???????????????)??????????
?????????????????----???????????????
???????? ?????????????????????????????????????
???????????б?????????????Щ???????????????
?????????Щ???????????DOM????
????1??DOM??????
????DOM????????????????????????????????γ?????????---DOM????
??????????????????????????(node)???????????????????????????е????(element)
????1??DOM??????????????
?????????????????????????????е??????в?????????????????????
????2??DOM??????????
?????????????????????DOM???????????????е??????????????----??Щ????????????????????
????3??DOM??????????
????????????е??????????????????????
????4??DOM?????????
???????????????????????????????????棬??????????????????????檔
????2??DHTML???????HTML????????????????????????????????
??????HTML+CSS??????????????????????????????????????????JS??DOM??????????DHTML??????HTML+CSS+JS+DOM
????3??HTML:??????????????
????4??CSS????????????????????????????ж???
????5??DOM: ???????????????????JS????
????6??JS: ?????????????????DOM????????????????????
??????? DOM?л?????????
????????????????????????????????????????????
????????????? ?????????????1???????????????2???????????????3
???????????????????null????????????????????????????????
????1??getElementById() :???????id????y?????
????function getNodeDemo1()
????‘???id?divid1????
????divNode= document.getElementById("divid2")
????‘???div????е???? innerHTML innerText ????
????txtHTML = divNode.innerHTML
????txt = divNode.innerText
????msgbox txtHTML+"??"+txt
????‘????div????е????????
????‘divNode.innerHTML="POPTEST??????????????????У??...."
????divNode.innerHTML="POPTEST??????????????????У??....??...."
????end
????2??getElementsByName() :???????name???????????----????????
????function getNodeDemo2()
????node = document.getElementsByName("userName");
????End
????3??getElementsByTagName() :????????????????????
????1?????document?μ?????
????function getNodeDemo3()
????nodes = document.getElementsByTagName("a")
????‘nodes.length’5
????‘nodes[0].innerHTML’???<a>????????????????????????
????‘????浱?е?????<a>?????? target???? ‘???????????????????????????????????????????????????
????For x=0 to nodes.length -1
????nodes[x].target = "_blank"
????next
????End
????2?????<div>????μ?????<a>???
????function getNodeDemo4()
????divNode = document.getElementById("mylink")
????nodes = divNode.getElementsByTagName("a") ‘????divNode????????????????
????for x=0 to nodes.length-1
????nodes[x].target = "_blank";
????end
????End
??????
???·???
??????????????????
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