解决方案 »

  1. <script type="text/javascript">
    var verifyURL = '/denglu/Index.php/Login/verify';
    </script>
    <script type="text/javascript">
    function change_code(obj){
    $("#code").attr("src",verifyURL+'/'+Math.random());
    return false;
    }
    <tr>
                     <th>验证码:</th>
                        <td><input type="code" class="" name="code" /><img src="/denglu/Index.php/Login/verify" id="code"/><a href=
    "javascript:void(change_code(this));">看不清</a></td>
                    </tr>
    我看不出哪里有错啊
      

  2. var verifyURL = '{:U("__PUBLIC__/Index/Login/verify","","")}';