解决后退,清空验证码(其它文本框保留)
①在頁面中window.οnlοad=setTimeout('函數名',0)
這樣就會在后退到頁面,并讀出緩存之后,執行你的操作
②以下為一個都不緩存
??????? //不允許緩存
??????? //Response.Buffer = true;
??????? //Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
??????? //Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
??????? //Response.Expires = 0;
??????? //Response.CacheControl = "no-cache";
??????? //Response.Cache.SetNoStore();
?③以下是用meta的辦法配合css來整的
<head>
? <META NAME="save" CONTENT="history">
? <title> ex1 </title>
</head>
<body>
? <input name=t1 type=text style="font-size:18" style="behavior:url(#default#savehistory)">我的信息還在
<br>
? <input name=t2 type=text style="font-size:18">我的哪去了呢??
? <p>
??? <a href="/"> click here </a>
? </p>
<body>
</html>
轉載于:https://www.cnblogs.com/lishenglyx/archive/2008/11/10/1330521.html
總結
以上是生活随笔為你收集整理的解决后退,清空验证码(其它文本框保留)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: (一) HTTP 1.1支持的状态代码
- 下一篇: 微软同步框架入门开篇(附SnapShot