XML初学者问题:刷新数据

Equn 2003-05-05 09:56:51
<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?
...全文
49 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
saucer 2003-05-05
  • 打赏
  • 举报
回复
try this, :-)

randomize

dim xmlobj
set xmlobj=createobject("Microsoft.XMLHTTP")
xmlobj.open "GET","myxml.xml?temp=" & rnd,false

8,909

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧