window.open('page.html','newwindow','height=150,width=300,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')

解决方案 »

  1.   

    在窗体的html代码的<head></head>中间加入如下脚本程序:
          <script   language='jscript'>   
                if   (window.name   !=   'notool') 
                  {   
                  window.open(location.href,'notool','toolbar=0');   
                   window.opener   =   null;   window.close();   
                  }   
            </script>
        上面的脚本不能改变大小,看看下面的脚本:
              <script language='jscript'>   
                if   (window.name   !=   'notool') 
                  {   
                  window.open(location.href,'notool','resizable=yes','toolbar=no');   
                   window.opener=null;   window.close();   
                  }   
        </script>
         这样就可以改变大小了。
      

  2.   

    <script language="javascript">
     
    function openwindow(aspx)
    {
    now = new Date
    s=now.getFullYear() 
     +now.getMonth()
     +now.getDay()
     +now.getHours()
     +now.getMinutes()
     +now.getMilliseconds (); aspx=aspx+'?T='+s;

    var win=window.open (aspx, 'window', 
    'height=700, width=1015, top=0, left=0,toolbar=no, menubar=no, resizable=no, scrollbars=no,location=no, status=yes');
    window.opener ='MailAdmin';
    win.focus ();
    window.close ();
    }
     
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>未命名頁面</title>
        
    </head>
    <body onLoad="openwindow('Default.aspx')">