写了一个让窗口居中的函数,但是无论怎么改,打开的窗口的大小(宽高)和位置都没有变化啊,大家帮忙看看是什么回事 function openConfig(){
var awidth=screen.availWidth/4*3; //窗口宽度,需要设置 var aheight=screen.availHeight/4*3; //窗口高度,需要设置
var atop=(screen.availHeight - aheight)/2; //窗口顶部位置,一般不需要改 var aleft=(screen.availWidth - awidth)/2; //窗口放中央,一般不需要改
var params ="top=" + atop + ",left=" + aleft + ",width=" + awidth + ",height=" + aheight +",innerHeight="+ aheight+",innerWidth="+ awidth + ",scrollbars=auto,status=no,menubar=no,resizable=no,location=no";
win = window.open("expConfig.jsp","配置表页面",params);
win.focus();
}
var awidth=screen.availWidth/4*3; //窗口宽度,需要设置 var aheight=screen.availHeight/4*3; //窗口高度,需要设置
var atop=(screen.availHeight - aheight)/2; //窗口顶部位置,一般不需要改 var aleft=(screen.availWidth - awidth)/2; //窗口放中央,一般不需要改
var params ="top=" + atop + ",left=" + aleft + ",width=" + awidth + ",height=" + aheight +",innerHeight="+ aheight+",innerWidth="+ awidth + ",scrollbars=auto,status=no,menubar=no,resizable=no,location=no";
win = window.open("expConfig.jsp","配置表页面",params);
win.focus();
}
window.open('pop1.shtml','toaWin','menubar=no,toolbar=no,location=no,directories=no,scrollbars=yes,status=yes,resizable=yes,top='+(screen.availHeight/2-150)+',left='+(screen.availWidth/2-175)+',width='+350+',height='+300);return false;