<script language="javascript">
window.name="one2two";
</script>

解决方案 »

  1.   

    or you can name a page in frameset:
    <frameset rows="100,*">
    <frame name="mywin" src="whatever.html">
    <frame name="mywin2" src="whatever2.html">
    </frameset>
      

  2.   

    就这样啊?不会吧!我试了怎么没反应?
    例:
    <script language="javascript">
    window.name="one2two";
    </script>
    <body>
    ......
    </body>
    <script>if (parent.name!=one2two){
    window.open("test.htm")
    }</script>
    还是能打开的!
    要不我再试试?
      

  3.   

    try this:
    1. copy these lines into a page, say "test.htm":
    <script language="javascript">
    //window.name="one2two";
    </script>
    <script>
    window.open("http://www.cnn.com","one2two");
    </script>2. open it, and you will see two windows
    3. remove "//" before window.name, try to open it again, you will see only one window