php-catcha图像脚本不起作用


php catcha image script not working

我在php上有一个captcha图像。任何人都能帮助获得刷新/重新加载代码吗。下面给出了我的php表单代码。

<form action=" " method="post" name=" ">
CAPTCHA: <input type="text" name="name" />
<img src=" " id="captcha" />
<input type="submit" value="SUBMIT" name="submit" />
</form>

您的问题并不具体。根据我的理解,你需要在不刷新整个页面的情况下重新加载captcah iamage,然后你可以使用javascript。

<script type="text/javascript">
function reloadImg() {
    var d=new Date();
    document.getElementById("captcha").src="http://www.yourfile.php?a="+d.getTime();
}

请在此处查看演示: