http://expert.csdn.net/Expert/topic/1350/1350963.xml?temp=.4764826

解决方案 »

  1.   

    方法1:
    <html>
    <head>
    <title></title>
    <head>
    <script>
    function closewin()
    {
    close();
    return;
    var xx1;
    xx1=window.open();
    xx1.document.open();
    xx1.document.write("aaa");
    xx1.document.close();
    xx1.moveTo(0,0);}
    </script> <body onload = "closewin()">

    </body>
    </html>
      

  2.   

    方法2:
    <html>
    <head>
    <title></title>
    <head>
    <script>
    var bClose = true;
    if (bClose)
    {
    close();
    }
    else
    {
    var xx1;
    xx1=window.open();
    xx1.document.open();
    xx1.document.write("aaa");
    xx1.document.close();
    xx1.moveTo(0,0);
    }
    </script> <body>

    </body>
    </html>