不刷新页面,如何强制图片刷新? var date=new Date();img1.src=图片地址+"?"+date.toLocaleString();只要保证每次src的字符串不同就会重取,但图片是连?前的地址 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 img1.src=img1.src + "?" + (new Date().getTime()) img1.src=img1.src + "?" + (new Date().getTime())这个我试了,还是不能保证100%的刷新。img1.src=图片地址;我也是用这个方法实现更换图片的,但是有时候可以更换有时候不行,这怎么回事?图片地址我用过以.开头的本服务器地址,也用过HTTP开头的地址,虽然都可以但是都不能保证100%的更换刷新,用了上面的img1.src=img1.src + "?" + (new Date().getTime())还是不行。如何实现?哪位有解决方法我百分相送!。 不抱错了,但是怎么还是不行啊??只有一次的效果<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>无标题文档</title></head><script language="javascript">var date=new Date();img.src=img/20050413_1_8.jpg + "img/20050413_1_7.jpg" + (new Date().getTime());//img1.src=img/20050413_1_8.jpg+"img/20050413_1_8.jpg"+date.toLocaleString();</script><body onload="onload()"><SCRIPT><!--transeffect = 0;theeffects = new Array(10);theeffects[0] = "盒状收缩";theeffects[1] = "盒状向外";theeffects[2] = "圆形收缩";theeffects[3] = "圆形向内";theeffects[4] = "从下向上";theeffects[5] = "从上向下";theeffects[6] = "从左向右";theeffects[7] = "从右向左";theeffects[8] = "百页窗形向右";theeffects[9] = "百页窗形向下";theeffects[10] = "棋盘形交叉向右";theeffects[11] = "棋盘形交叉向下";theeffects[12] = "随意溶解形";theeffects[13] = "左右向内";theeffects[14] = "左右向外";theeffects[15] = "上下向内";theeffects[16] = "上下向外";theeffects[17] = "条纹状向左下";theeffects[18] = "条纹状向左上";theeffects[19] = "条纹状向右下";theeffects[20] = "条纹状向右上";theeffects[21] = "溶解水平状";theeffects[22] = "溶解上下状";theeffects[23] = "随着溶解";current_image = "image1";function onload(){ var img = document.all["image1"]; img.filters[0].Apply(); img.filters[0].Transition = Math.floor(Math.random() * 24); img.filters[0].Play(2.0); img.style.visibility='visible';}//--></SCRIPT><DIV id=image><DIV id=text1></DIV> <table width="135" height="180" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" background="img/20050413_1_1.jpg"><IMG src="img/20050413_1_4.jpg" width="135" height="180" id=image1 style="FILTER: revealTrans(Duration=3.0,Transition=1); VISIBILITY: hidden"></td> </tr> </table></DIV></body></html>我想要的是不停的有图像变化的效果!谢谢了! 如何隐藏javascript代码 如何把覆盖在弹出大图上的小图去掉 构造函数和对象原型到底什么区别? 格式化字符串 网页中对话框的遮罩制作 请教,处理未定义对象的办法 如何捕捉一个框架网页的关闭事件? select名称为数组,怎么办? 当单击菜单项时打开对应的链接页面,想要传递对应的模块ID值供打开的页面用。请问怎样传递并保存模块ID值? 我用createElement()来创建一个button,该如何为其添加onClick事件,要求同时能传递参数! 求一正则表达式 VBscript 里 chr() 与 chrB()到底什么区别???我快疯了!!!
这个我试了,还是不能保证100%的刷新。img1.src=图片地址;
我也是用这个方法实现更换图片的,但是有时候可以更换有时候不行,这怎么回事?图片地址我用过以.开头的本服务器地址,也用过HTTP开头的地址,虽然都可以但是都不能保证100%的更换刷新,用了上面的img1.src=img1.src + "?" + (new Date().getTime())还是不行。如何实现?哪位有解决方法我百分相送!。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script language="javascript">
var date=new Date();
img.src=img/20050413_1_8.jpg + "img/20050413_1_7.jpg" + (new Date().getTime());
//img1.src=img/20050413_1_8.jpg+"img/20050413_1_8.jpg"+date.toLocaleString();
</script><body onload="onload()"><SCRIPT>
<!--
transeffect = 0;
theeffects = new Array(10);
theeffects[0] = "盒状收缩";
theeffects[1] = "盒状向外";
theeffects[2] = "圆形收缩";
theeffects[3] = "圆形向内";
theeffects[4] = "从下向上";
theeffects[5] = "从上向下";
theeffects[6] = "从左向右";
theeffects[7] = "从右向左";
theeffects[8] = "百页窗形向右";
theeffects[9] = "百页窗形向下";
theeffects[10] = "棋盘形交叉向右";
theeffects[11] = "棋盘形交叉向下";
theeffects[12] = "随意溶解形";
theeffects[13] = "左右向内";
theeffects[14] = "左右向外";
theeffects[15] = "上下向内";
theeffects[16] = "上下向外";
theeffects[17] = "条纹状向左下";
theeffects[18] = "条纹状向左上";
theeffects[19] = "条纹状向右下";
theeffects[20] = "条纹状向右上";
theeffects[21] = "溶解水平状";
theeffects[22] = "溶解上下状";
theeffects[23] = "随着溶解";current_image = "image1";
function onload()
{
var img = document.all["image1"];
img.filters[0].Apply();
img.filters[0].Transition = Math.floor(Math.random() * 24);
img.filters[0].Play(2.0);
img.style.visibility='visible';
}
//--></SCRIPT>
<DIV id=image>
<DIV id=text1></DIV>
<table width="135" height="180" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" background="img/20050413_1_1.jpg"><IMG
src="img/20050413_1_4.jpg" width="135" height="180" id=image1
style="FILTER: revealTrans(Duration=3.0,Transition=1); VISIBILITY: hidden"></td>
</tr>
</table>
</DIV>
</body>
</html>
我想要的是不停的有图像变化的效果!谢谢了!