代替 response.Redirect的javascript 代码

·

response.Redirect 不能在新窗口打开,用下面的javascript来代替。

Response.Write("<script>window.location=’editor.asp’;</script>")

在父级页面打开

Response.Write( " <script> top.location= ‘xxx.aspx ‘ </script> ");
相当于改变地址栏里的路径
Response.Write( " <script> parent.location= ‘xxx.aspx ‘ </script> ")
相当于改变当前页的父页地址

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注