window.open居中显示

2021-07-16 09:20

阅读:701

var iTop = (window.screen.availHeight-30-350)/2; //获得窗口的垂直位置;
var iLeft = (window.screen.availWidth-10-500)/2; //获得窗口的水平位置;
window.open(gotoUrl,"" ,"height=350,width=500,top="+iTop+",left="+iLeft+",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");


评论


亲,登录后才可以留言!