首页 > 代码库 > 打开弹出窗口并居中

打开弹出窗口并居中

function update(){
var iHeight=400;
var iWidth=650;
var iTop = (window.screen.availHeight-30-iHeight)/2; //获得窗口的垂直位置
var iLeft = (window.screen.availWidth-10-iWidth)/2; //获得窗口的水平位置;
window.open
("/pecuse/backStage/skill/update.jsp", "newwindow","height="+iHeight+", width="+iWidth+", top="+iTop+",left="+iLeft
+"toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no")
}