且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

覆盖后退按钮

更新时间:2023-01-10 10:30:51

尝试这个java脚本.. 。



try this java script too...

<script type="text/javascript">
    window.history.forward();
    function noBack() { window.history.forward(); }
</script>

<body onload="noBack();">
    onpageshow="if (event.persisted) noBack();" onunload=""></body>


尝试以下代码:



try the following code:

Response.Cache.SetCacheability(HttpCacheability.NoCache);
  Response.Cache.SetExpires(Now.AddSeconds(-1));
  Response.Cache.SetNoStore();
  Response.AppendHeader("Pragma", "no-cache");