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:

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

报告相同问题?

悬赏问题

  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥30 自适应 LMS 算法实现 FIR 最佳维纳滤波器matlab方案
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥15 Python3.5 相关代码写作
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动