The following is part of the html verification code
<div class="row cl"> <div class="formControls col-xs-8 col-xs-offset-3"> <input class="input-text size-L" type="text" placeholder="验证码" onblur="if(this.value==''){this.value='验证码:'}" onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:" style="width:150px;"> <img id="verify_img" src="{:captcha_src()}" onclick="this.src=this.src"> <a id="kanbuq" href="javascript:refreshVerify;">看不清,换一张</a> </div> </div>
javacript
<!-- <script> // 用下面方法点击刷新无反应 function refreshVerify() { var ts = Date.parse(new Date())/1000; $('#verify_img').attr("src", "/captcha?id="+ts); } </script> --> <script> //在家里用这个方法可以实现点击文字刷新,在单位电脑上依然无任何反应 function refreshVerify() { var ts = Date.parse(new Date())/1000; var img = document.getElementById('verify_img'); img.src = "{:captcha_src()}"; } </script>
May I ask why this is! ! ! ! Solve
Brother, I have the same problem, can you help me answer it
It has been solved, no need to reply again
I don’t quite understand, but how do you trigger your js?