window.open("http://www.csdn.net/","windowname","")
只要你将 "windowname" 取成一样的就行了。

解决方案 »

  1.   

    <html>
    <head>
    </head>
    <script language="javascript">
    function inf(){
      try{
       newwin.document.body.innerHTML='';
       newwin.document.write('使用旧窗口')
       newwin.focus()
     }
     catch(x){
       newwin=window.open('','','width=100,height=100')
       newwin.document.write('开了一个新窗口,第一次提示')
       newwin.focus()
     }
    }
    </script>
    <input type=button value=弹出题是 onclick="inf()">
    </body>
    </html>
      

  2.   

    <html>
    <head>
    </head>
    <script language="javascript">
    function inf(){
      try{
       newwin.document.body.innerHTML='';
       newwin.document.write('hello world')
       newwin.focus()
     }
     catch(x){
       newwin=window.open('','newwin','width=100,height=100')
       newwin.document.write('hello world')
       newwin.focus()
     }
    }
    </script>
    <body onunload=inf()>
    </body>
    </html>