Home  >  Article  >  Backend Development  >  怎样用js刷新验证码页面(php做的)解决方法

怎样用js刷新验证码页面(php做的)解决方法

WBOY
WBOYOriginal
2016-06-13 10:11:37764browse

怎样用js刷新验证码页面(php做的)
我是想在登录页面的点击【看不清】将随机码刷新: 怎样用js刷新验证码页面(php做的)解决方法 看不清  
其中checkcode.php是随机码页面。只是刷新这个check.php,而不是整个index.php都刷新


------解决方案--------------------

HTML code
<img  id="code" src="checkcode.php" alt="怎样用js刷新验证码页面(php做的)解决方法" ><a href="javascript:;" onclick="refreshCode()">看不清</a>   <script>var src= document.getElementById('code').src;function refreshCode(){        document.getElementById('code').src=src+"?code=" + Math.random(); }</script><div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn