首先,獲取屏幕的寬和高
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打開的窗口會默認在最前,只有關閉新打開的窗口纔可以訪問原窗口