父页面执行后,使用jquery探出了一个窗口.var panelObj=new WrmPanel("outerLog",url);
panelObj.setContentPage(url1);
function preCreateSubLog(){
panelObj.show();
}
子页面if(window.confirm(message+"\r\n是否确定关闭窗口?")) {
alert(window.parent.location.href);
window.parent.location=url2;
alert(window.parent.location.href);
}执行这个方法后,2个alert都显示是原来的地址,我明明修改过location,第2个应该显示url2才对啊.
不过执行后,跳转的地址确是对的....请各位指点下
panelObj.setContentPage(url1);
function preCreateSubLog(){
panelObj.show();
}
子页面if(window.confirm(message+"\r\n是否确定关闭窗口?")) {
alert(window.parent.location.href);
window.parent.location=url2;
alert(window.parent.location.href);
}执行这个方法后,2个alert都显示是原来的地址,我明明修改过location,第2个应该显示url2才对啊.
不过执行后,跳转的地址确是对的....请各位指点下
与
window.opener.location
可否详解下...window.parent 是iframe页面调用父页面对象.
就是说不是iframe的话,window.parent.location应该没有值啊.
为什么,window.parent.location=url2.页面可以跳转到url2页面呢?
window.parent.location.href=url2;
alert(window.parent.location.href);第2个还是没变..不是u输出rl2