首先利用screen.width和screen.height得到窗口大小,在计算以确定位置

解决方案 »

  1.   

    在要打开的网页的body中加上
    <body onload="BodyOnLoad()">function BodyOnLoad()
    {
      var top=((window.screen.availHeight-document.body.clientHeight)/2);
      var left=((window.screen.availWidth-document.body.clientWidth)/2);  window.moveTo(left, top);
    }
      

  2.   

    先了解一个
    window.open('help.htm','','width=1000,height=750,top=0,left=0,scrollbars=yes')
    明白了吧?
    定一下top和left的值就搞定了。
    如何计算,就看你了。
    可以用楼上的