先执行
document.location.replace = “/”;
在执行
window.opener.location.href=window.opener.location.href;
window.close();
IE支持这种写法
其他浏览器没有执行document.location.replace = “/”; 执行了
window.opener.location.href=window.opener.location.href;
window.close();
repalce是函数。。
document.location.replace="/"改为document.location.replace("/")
而且你关闭了窗口还replace干嘛,要先刷新父页再close,replace会发生跳转也可能导致父页刷新的js不执行,刷新要放第一句来执行
window.opener.location.href=window.opener.location.href;
document.location.replace("/")
window.close();
这个js是写在弹出页面的 我现在需要的是 弹出页面执行了document.location.href="/" 之后 在执行 其他的 IE 支持 其他浏览器不支持
function save(){
document.getElementById("pointsform").submit();
alert('保存成功');
window.opener.document.getElementById("cmd").value="query";
window.opener.document.getElementById("khxzform").submit();
window.close();
}