hao_2468

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
   function opennwindow(url,width,height)
   {
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ))
    {
    xposition = (screen.width - width) / 2;     //窗体居中的x坐标
    yposition = (screen.height - height) / 2;   //窗体居中的y坐标
    }
    theproperty= "width=" + width + ","         //打开窗口的属性
    + "height=" + height + ","
    + "location=0,"
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0,"
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + "," //仅适用于Netscape
    + "screeny=" + yposition + "," //仅适用于Netscape
    + "left=" + xposition + "," //IE
    + "top=" + yposition; //IE
    window.open( url,null,theproperty );     //打开窗口
   }
   
    </script>
posted on 2009-09-11 11:14  hao_2468  阅读(182)  评论(0编辑  收藏  举报