请帮看一下以下代码!看问题出在哪?

laboo 2006-02-02 12:45:44
<TD width=80><img src="../con.asp" width="80" height="20" alt="点击验证码可刷新" align="absmiddle" onClick="this.src='../con.asp';"></TD>

访问的时候是正常的,但如果提交并使用了history.go(-1)或者history.back的时候,这个点击就刷新的按纽就失效了,再怎么点也没用了,请问,怎么才能叫他仍然起作用呢?
...全文
170 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
anwell 2006-02-03
  • 打赏
  • 举报
回复
<TD width=80><a href="../con.asp"><img src="../con.asp" width="80" height="20" alt="点击验证码可刷新" align="absmiddle" border="0"></a></TD>

加个边框为0
anwell 2006-02-03
  • 打赏
  • 举报
回复
<TD width=80><a href="../con.asp"><img src="../con.asp" width="80" height="20" alt="点击验证码可刷新" align="absmiddle"</a></TD>

这样试一下
laboo 2006-02-03
  • 打赏
  • 举报
回复
顶!
睡觉!
king_shadow 2006-02-03
  • 打赏
  • 举报
回复
因为history.go(-1)或者history.back该页面没有刷新
如果该页面缓存,你可将缓存去掉,则它自动会刷新
方法1:
<meta http-equiv="pragma" content="no-cache">
方法2:
<%
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now - new TimeSpan(1, 0, 0);
Response.Expires = 0;
Response.CacheControl = "no-cache";
%>
如是填表功能
或者在你需要输入的文本框的onmousedown事件中,调用
<img src="../con.asp" width="80" height="20" alt="点击验证码可刷新" align="absmiddle" onClick="this.src='../con.asp';" id="imgcode">

<input type="text" name="txtname" onmousedown="imgcode.src='../con.asp'">

-----------------------------------------------------------------
ASP技术群 4259772
AJAX JS VBS技术群 17528532
laboo 2006-02-02
  • 打赏
  • 举报
回复
没人知道?

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧