B/S安全退出
<script language="javascript" type="text/javascript"> function A_exit() { if (confirm("你确定要退出吗?") == true) { location.replace("/ClearIE.aspx"); event.returnValue = false; return true; } else { return false; } } </script>
ClearIE.aspx页面代码
<script type="text/ecmascript" language="javascript"> function b(){ var Backlen = history.length; if (Backlen > 0) { history.go(-Backlen); } top.window.location.href = "/MemberInfo/login.aspx"; } </script>
protected void Page_Load(object sender, EventArgs e) { clearIE(); } public void clearIE() { Session["user"] = null; Session.Clear(); Response.Cache.SetExpires(DateTime.Now.AddSeconds(5)); Response.Cache.SetSlidingExpiration(true); Session.Abandon(); }