XML初学者问题:刷新数据

Equn Equn 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
</head>
<script language="VBScript">
dim i
sub window_onload()
setInterval "DownXml",10000
end sub

sub DownXml()
dim xmlobj
set xmlobj=createobject("Microsoft.XMLHTTP")
xmlobj.open "GET","myxml.xml",false
xmlobj.send
top.mainFrame.document.write(xmlobj.status&"-")
top.mainFrame.document.write(xmlobj.statusText)
set xmldom=xmlobj.responseXml
set objnode=xmldom.documentElement.childNodes
top.mainframe.document.write("<table>")
for i=0 to objnode.length-1
top.mainFrame.document.write("<tr><td>"&objnode.item(i).nodename&"</td>")
top.mainFrame.document.write("<td>"&objnode.item(i).text&"</td></tr>")
next
top.mainFrame.document.write("</table>")
set xmlobj=nothing
set xmldom=nothing
set objnode=nothing
end sub
</script>


<body>

</body>
</html>

上面的代码每隔10000毫秒读取服务器端myxml.xml文件。
修改服务器myxml.xml文件,并不能在端户端读取最新的文件
每次执行downxml函数,读取的都是修改前的文件。
why?
...全文
评论 1
收藏 已收藏
分享
返回顶部
Equn
XML/XSL 8,906 成员 22,677 内容