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?