日期:2014-05-18  浏览次数:20463 次

页面返回后,验证码无法切换
<img   id= "img_check "   src= "../ValidateCode.aspx "   style= "cursor:pointer; "   title= "验证码 "   />  
<a   href= "# "   onclick= "javascript:document.getElementById( 'img_check ').src= '../ValidateCode.aspx '; "> 换图 </a>

代码如上

如果用户输入的信息有错误的话,页面history.g0(-1)

此时发生了RT的情况,点那个“换图”啥反映也没。。。。。。

大家帮忙看看,50分送上

------解决方案--------------------
onclick= "javascript:this.src= '../ValidateCode.aspx?rnd= '+Math.random(); "
------解决方案--------------------
缓存问题
加一个时间标记也行

onclick= "javascript:document.getElementById( 'img_check ').src= '../ValidateCode.asp?timestamp= '+new Date() ";