重新加载php图像(captcha) [英] Reload php image (captcha)
本文介绍了重新加载php图像(captcha)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是一个验证码图片,如果用户需要,该图片将会重新载入图片。此代码仅适用于Google Chrome。
This is a captcha image with a link that will reload the picture if the user wants. This code works only in Google Chrome. How do I make it work in other browsers?
<img id="captcha" src="captcha.php">
<a id='reload'>Refresh now</a>
$('#reload').click(function(){
$('#captcha').attr('src','captcha.php')
})
推荐答案
其他浏览器可能会缓存图片。请尝试以下操作:
The other browsers probably cache the image. Try the following:
$("#captcha").attr("src", "captcha.php?"+(new Date()).getTime());
这篇关于重新加载php图像(captcha)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文