关于提示页面已过期的问题:ASP网页做成了不在本地缓存。
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
%>
关于使后退按钮变灰的问题:
在脚本中没有清空window.history对象的函数,要有也是另一种变通的方法
新开一个网页,关闭老的网页
<OBJECT id=closes type=application/x-oleobject height=0 width=0
classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11>
<PARAM NAME="Command" VALUE="Close"></OBJECT>
<script language="Javascript"><!--
function opena(){
document.closes.Click();
window.open(top.location,'big','');
window.focus();
}
if(window.name != "big")opena(); //最好每张网页name改一下
// --></script>
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
%>
关于使后退按钮变灰的问题:
在脚本中没有清空window.history对象的函数,要有也是另一种变通的方法
新开一个网页,关闭老的网页
<OBJECT id=closes type=application/x-oleobject height=0 width=0
classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11>
<PARAM NAME="Command" VALUE="Close"></OBJECT>
<script language="Javascript"><!--
function opena(){
document.closes.Click();
window.open(top.location,'big','');
window.focus();
}
if(window.name != "big")opena(); //最好每张网页name改一下
// --></script>
这是利用了window.open函数的最后一个参数。<a href="javascript:ropen('http://news.sohu.com')">打开</a>
<INPUT type=button value="打开" LANGUAGE=javascript onclick="ropen('http://news.sohu.com');">
<script>
function ropen(surl){
window.name="test";
window.open(surl,"test","",true);
}
</script>