做WEB站点,表头是iframe有跳转功能
有Button按钮使结果转向Response.Redirect()
设定转向指定在父窗口打开需如下操作:
------------------------------------------------------------------------------------------------------
Response.Write("<script>window.top.location='xxx.aspx'</script>");
相当于改变地址栏里的路径
Response.Write("<script>window.parent.location='xxx.aspx'</script>")
相当于改变当前页面的父页面地址
两者均不会被拦截
------------------------------------------------------------------------------------------------------
如果有多层iframe,要控制中间层页面跳转
可以使用window.parent.parent.location='xxx.aspx'方式实现
有Button按钮使结果转向Response.Redirect()
设定转向指定在父窗口打开需如下操作:
------------------------------------------------------------------------------------------------------
Response.Write("<script>window.top.location='xxx.aspx'</script>");
相当于改变地址栏里的路径
Response.Write("<script>window.parent.location='xxx.aspx'</script>")
相当于改变当前页面的父页面地址
两者均不会被拦截
------------------------------------------------------------------------------------------------------
如果有多层iframe,要控制中间层页面跳转
可以使用window.parent.parent.location='xxx.aspx'方式实现