试下
if(opener==null)
{
   alert("不是open窗口")
}

解决方案 »

  1.   

    <script language="JavaScript">
    <!--
    function showWinName(){
    alert (this.name);
    }
    //-->
    </script>
      

  2.   

    1.htm<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> New Document </title>
    </head><body>
    <a href="22.htm" target="_blank">fdsafdas</a>
    <a href="22.htm" target="subwin">fdsafdas</a>
    <a href="#" onclick="window.open('22.htm','thisisaopenwin')">fdsafdas</a>
    </body>
    </html>---------------
    22.htm<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> New Document </title>
    <script language="JavaScript">
    <!--
    function showWinName(){
    alert (this.name);
    }
    //-->
    </script>
    </head><body onload="showWinName()"></body>
    </html>
      

  3.   

    晕,不行,target="_blank"这样打出来的也有opener
      

  4.   

    哈,我的思路有问题,正转方式按fantiny的兄弟的思路想呢,没想到已经有答案了。:)
      

  5.   

    刚刚测试过了
    fantiny兄弟,赞一个:)
      

  6.   

    target="_blank",子窗口的name应该是没有的吧?
    但是target="subwin",子窗口的name也有值了,
    和window.open(url,'subwin1')打开的子窗口一样。我遇到的问题是,要统一处理项目中子窗口,需要区分是由window.open打开的还是点击连接打开的。
    但是,由于项目已经接近尾声了,不同的程序员用window.open打开的窗口,有的有name,有的没有name....哭啊!
      

  7.   

    另外,如果一个连接的target是指向本窗口_self,那我按着shift+点击或者用IE右键中的“在新窗口中打开连接”所打开的窗口,是不是和target="_blank"一样呢?