以文本方式查看主题

-  W3CHINA.ORG讨论区 - 语义网·描述逻辑·本体·RDF·OWL  (http://bbs.xml.org.cn/index.asp)
--  『 DOM/SAX/XPath 』  (http://bbs.xml.org.cn/list.asp?boardid=11)
----  關於DOM請教!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=11&rootid=&id=13796)


--  作者:snowman
--  发布时间:1/19/2005 10:40:00 AM

--  關於DOM請教!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
  <title>簡單的X_Stock首頁</title>
  <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
  <meta name="ProgId" content="VisualStudio.HTML">
  <meta name="Originator" content="Microsoft Visual Studio .NET 7.1">
  <script language="javascript" for="window" event="onload">
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Xstock.xml");
var xmlRoot=xmlDoc.documentElement;
title.innerText=xmlRoot.nodeName;
nodes_L2=xmlRoot.childNodes;                            
node_L2=nodes_L2.nextNode();                                                                  
nodes_L3=node_L2.childNodes;
node_L3=nodes_L3.nextNode();
target.innerText=node_L3.text;
/*node_L3=nodes_L3.nextNode();
notice.innerText=nodie_L3.text;
node_L3=nodes_L3.nextNode();
str=":";
str1=node_L3.nodeName;
str2=node_L3.text;
email.innerText=str1+str+str2;
node_L3=nodes_L3.nextNode()
str3=node_L3.nodeName
welcome.innerHTML=str3+str+node_L3.text.link(node_L3.text);*/

  </script>
 </head>
 <body>
  <DIV id="title" />
  <DIV id="target" />
  <DIV id="notice" />
  <DIV id="hlink" /><a href="xstockSpage.html">今日股評</a></DIV>
  <DIV id="email" />
  <DIV id="welcome" />
 </body>
</html>


提示target標記未定義!


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms