首先,获取屏幕的宽和高
var screenHeight = window.screen.height;
var screenWidth = window.screen.width;
然后,利用window.open或showModalDialog打开新窗口
window.open(url, "_blank", "width=" + screenWidth + ",height=" + screenHeight + ",top=0,left=0, toolbar=no,menubar=no,resizable=no,location=no, status=no");
或
var obj = {};
obj.name = "权限管理";
window.showModalDialog(url, obj, "dialogWidth=" + screenWidth + "px;" +
"dialogHeight=" + screenHeight + "px;" +
"dialogLeft=0px;dialogTop=0px;status=no;");
注:
window.showModalDialog打开的窗口会默认在最前,只有关闭新打开的窗口才可以访问原窗口