日期:2014-05-18  浏览次数:20459 次

js改变父页面的地址问题、在线等。
我在a页面些的js代码如下:
window.opener.location.href = "/AccountManage/PASSWORD.aspx";
但是,浏览器地址显示如下,并且没到PASSWORD页面,而是到了登录页面,请解释。
http://localhost:2216/cindex.aspx?referrer=http://localhost:2216/AccountManage/PASSWORD.aspx
为什么会被referrer了呢?
怎样才能不要referrer前面的地址呢?
求高手、谢谢。

------解决方案--------------------
跟这段代码没关系,
应该是你的
/AccountManage/PASSWORD.aspx
页面进行了判断导致
------解决方案--------------------
如果你的外站带虚拟目录,你需要这样

window.opener.location.href = "<%=Page.ResolveUrl("~")%>AccountManage/PASSWORD.aspx";
------解决方案--------------------
~/
不能使用在js,html里面

------解决方案--------------------
直接window.location= "/AccountManage/PASSWORD.aspx";