duanaixuan7385 2014-08-30 05:54
浏览 35
已采纳

php captcha图像脚本无法正常工作

I am having one captcha image on php. Can any body help in getting the refresh/ reload code. My php form code is given below.

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

1条回答 默认 最新

  • dtdr84101 2014-08-30 06:07
    关注

    Your question is not specific. As per my understanding, you require reload captcah iamge with out refreshing the entire page, then you may use javascript.

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

    Check here the demo:

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?