就是用户注销(在父窗口)后,父窗口跳转到登录页面,子窗口就没有opener的权限了function mylogout(){ alert("会话超时,请重新登录!");
if(window.dialogArguments) {
window.dialogArguments.top.document.location = '/';
}else if(self.opener){
self.opener.top.document.location = '/'; //出错的地方 报“没有权限”
}else{
top.document.location = '/';
}
window.close();}这个方法是处理DWR会话超时用到的
if(window.dialogArguments) {
window.dialogArguments.top.document.location = '/';
}else if(self.opener){
self.opener.top.document.location = '/'; //出错的地方 报“没有权限”
}else{
top.document.location = '/';
}
window.close();}这个方法是处理DWR会话超时用到的
<input type=button onclick="closes()" value="close"/>
<script>
var opentest;
function opens(){
opentest=window.open('test1.html');
}
function closes(){
opentest.close();
}
</script>
父页面关闭子页面的方法