一个简单问题,送分!
我想作一个程序,在后台对图像处理,然后在前台用WEB页显示.有什么好方法可以让WEB页实时调用修改后的图片(已存成图像文件)?? 问题点数:0、回复次数:7Top
1 楼mrshelly(Shelly)回复于 2004-11-04 11:59:09 得分 0
刷新~~~~~~~~~~Top
2 楼zjlie(清音扬)回复于 2004-11-04 12:36:25 得分 0
同意楼上的!Top
3 楼Alvin665(Alvin)回复于 2004-11-04 13:38:01 得分 0
有没有高人能指点我啊?Top
4 楼shot_big(smile)回复于 2004-11-04 13:45:37 得分 0
<html>
<head>
<title>Untitled Document</title>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<meta http-equiv='pragma' content='no-cache'>
</head>
<script language="VBScript">
dim id
sub window_onload()
setInterval "DownXml",1000
end sub
sub DownXml()
dim xmlobj,NumRnd
randomize
NumRnd=100000*rnd+1
set xmlobj=createobject("Microsoft.XMLHTTP")
xmlobj.open "GET","myxml.asp?view=1",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>")
if objnode.item(i).nodename="id" then
id=objnode.item(i).text
end if
next
top.mainFrame.document.write("</table>")
set xmlobj=nothing
set xmldom=nothing
set objnode=nothing
end sub
</script>
<body>
myxml.asp文件中必需是输出XML格式文档,如:
也可以使用setInterval结合xml无刷新通知,下面是一段示例代码。myxml.asp文件中检查部门经理是否有新的文件。
<iframe name="mainFrame" src="about:blank"></iframe>
</body>
</html>
<%
response.ContentType="text/xml"
response.Expires=0
response.Write("<?xml version=""1.0"" encoding=""gb2312""?>")&vbcrlf
response.write("<msg><file><filename>新文件</filename></file></msg>")
%>Top
5 楼shot_big(smile)回复于 2005-03-16 17:20:39 得分 0
给你顶一下Top
6 楼vivianfdlpw()回复于 2005-03-16 17:53:51 得分 0
用计时器定时对图片刷新
<script>
function get()
{
window.status='欢迎您的光临';
document.getElementById('img').src='1.jpg?temp='+Math.random().toString();
}
window.onload=function()
{
window.setInterval('get()',5000);
}
</script>
<body>
<img src="1.jpg" id="img">
</body>
Top
7 楼warmage(严武)回复于 2005-03-16 21:47:24 得分 0
页面的刷新时间 属性可以设置为 例如1秒Top




