首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

页面返回后,验证码无法切换,该如何处理

2012-01-19 
页面返回后,验证码无法切换imgid img_check src ../ValidateCode.aspx style cursor:pointer t

页面返回后,验证码无法切换
<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() ";

热点排行