全屏 window.open("whatever.htm","","fullscreen"),但 ie 很丑陋,全屏后只有 Alt-F4 才能关闭。
还是居中为好,但要费点笔墨:
function popup(url)
{
var width
= 300;
var height = 200;
var left
= (screen.width
- width)/2;
var top
= (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=no';
params += ', toolbar=no';
newwin=window.open(url,'windowname5', params);
if (window.focus) {newwin.focus()}
return false;
}