gpt4 book ai didi

php - 重新加载 php 图像(验证码)

转载 作者:太空狗 更新时间:2023-10-29 13:54:16 26 4
gpt4 key购买 nike

这是一个带有链接的验证码图像,如果用户需要,该链接将重新加载图片。此代码仅适用于 Google Chrome。我如何让它在其他浏览器中工作?

<img id="captcha" src="captcha.php">

<a id='reload'>Refresh now</a>

$('#reload').click(function(){
$('#captcha').attr('src','captcha.php')
})

最佳答案

其他浏览器可能会缓存图像。尝试以下操作:

$("#captcha").attr("src", "captcha.php?"+(new Date()).getTime());

关于php - 重新加载 php 图像(验证码),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14127132/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com