父窗口
function myMenu(url,num)
{var obj = new Object();
url=url+"&pUserId="+num;
openwindow(url, obj, 420, 480);
}
function openwindow(url, obj, iWidth, iHeight) {
var iTop = (window.screen.height - 30 - iHeight) / 2; //获得窗口的垂直位置;
var iLeft = (window.screen.width - 10 - iWidth) / 2; //获得窗口的水平位置;
window.open(url, obj, 'height=' + iHeight + ',innerHeight=' + iHeight + ',width=' + iWidth + ',innerWidth=' + iWidth + ',top=' + iTop + ',left=' + iLeft + ',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
}
子窗口
//这里是获取父窗口对象
var windowOpener=window.opener;
windowOpener.location.reload(true);
window.close();