我也遇到相似问题//初始化,把弹出的窗口对像给全局变量attach
//var timer;
var attach;
function initWin(obj){
attach = obj;
attach.focus();
//设置定时执行函数的时间
timer=window.setInterval("IfWindowClosed()",500);
}//判断窗口是否关闭
function IfWindowClosed() {
//alert();//如果把alert运行,下面那句就不会提示没权限,就可以正常运行
if (attach.closed) {//这句提示没有权限
window.location=window.location;
window.clearInterval(timer);
attach = null;
} }