var url = htmUrl;
var top = (screen.availHeight - h)/2;
var left = (screen.availWidth - w)/2;
var p = "scrollbars=0,status=0,menubar=0,resizable=2,location=0";
var params = "top=" + atop + ",left=" + aleft + ",width=" + awidth + ",height=" + aheight + "," + p ;
win = window.open(url,'SampleName',params);
win.focus();

screen.availHeight 和 availWidth 分别获取屏幕的大小

 posted on 2009-12-16 23:11  野人哥哥  阅读(366)  评论(0编辑  收藏  举报