window.location.replace 可以后退

yangyunfei 2012-06-27 11:27:12
window.location.replace 和 window.location.href都是在原窗口打开,区别replace 清空历史,不能后退。
为啥实际开发中,href的时候反而不能后退呢,
...全文
902 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
yangyunfei 2012-06-27
  • 打赏
  • 举报
回复
protected void Page_Load(object sender, EventArgs e)
{
if (Request["type"] != null && Request["type"] == "loginout")
{
Session.Remove("loginuser");
Response.Write("<script>window.location.href('Default.aspx');</script>");
Response.End();
}
if (!Page.IsPostBack)
{

}
}

111,125

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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