<SCRIPT LANGUAGE="javascript">
<!--
window.open ('page.html', 'newwindow', 'height=100, width=400, top=0, 
left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n
o, status=no')
//写成一行
-->
</SCRIPT>  参数解释:
<SCRIPT LANGUAGE="javascript"> js脚本开始;
window.open 弹出新窗口的命令;
'page.html' 弹出窗口的文件名;
'newwindow' 弹出窗口的名字(不是文件名),非必须,可用空''代替;
height=100 窗口高度;
width=400 窗口宽度;
top=0 窗口距离屏幕上方的象素值;
left=0 窗口距离屏幕左侧的象素值;
toolbar=no 是否显示工具栏,yes为显示;
menubar,scrollbars 表示菜单栏和滚动栏。
resizable=no 是否允许改变窗口大小,yes为允许;
location=no 是否显示地址栏,yes为允许;
status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许;
</SCRIPT> js脚本结束

解决方案 »

  1.   

    <script>
    //t.htm你要打开的窗口
    var a = test();
    switch (a)
    {
    case "640*480":
    window.open("t.htm","","width=200,height=200,status=no,toolbar=no,menubar=no,location=no,left=440,top=280");
    break;
    case "800*600":
    window.open("t.htm","","width=200,height=200,status=no,toolbar=no,menubar=no,location=no,left=600,top=400");
    break;
    case "1024*768":
    window.open("t.htm","","width=200,height=200,status=no,toolbar=no,menubar=no,location=no,left=824,top=568");
    break;
    default:;
    }function test()
    {
    var size;
    if ((screen.width == 640) && (screen.height == 480))
    size = "640*480";
    else if ((screen.width == 800) && (screen.height == 600))
    size = "800*600";
    else if ((screen.width == 1024) && (screen.height == 768))
    size = "1024*768";
    return size;
    }
    </script>
      

  2.   

    测分辨率时应该有个默认值
    var size="640*480";
    不很完善,再改改吧