firefox 载入图片不更新

来源:百度知道 编辑:UC知道 时间:2024/05/28 18:57:57
以下代码可以在ie下从新载入图片(用php随机生成的图片),可是在firefox下不行,该怎样更新可以同时在ie和firefox下同时更新图片

<input name="imgg" type="button" class="input2" value="我看不清" onclick="javascript:document.all.form1.img.src='../validateCode.php';document.form1.verifycode.focus();"/></td>

firefox首先读缓存,该文件已在缓存中存在,故再不读服务器,可以更改url让其读取(例:http://hello.php?123

可以使用show image这个扩展来实现。