var b  =null
function open(url)
{
if(b && b.open && !b.closed)
b.focus()
else
b = window.open(url)
}

解决方案 »

  1.   

    var b  =null
    function OpenWin(url)
    {
    if(b && b.open && !b.closed)
    b.focus()
    else
    b = window.open(url)
    }
      

  2.   

    to net_lover(孟子E章);你的方法是行不通的!!!你只考虑到了某一个或俩个窗口,我要是有5个窗口的,我就要定义5个全局变量!!而且对其中的某一个(或多个)窗口关闭时,还要将起对应的全局变量置空.但是怎么获得窗口关闭的事件呢?!,(onunload是窗口的卸载事件,不是关闭事件)
      

  3.   

    to  clarass(挂狗头卖羊肉) 
      rabbit666(yesterday once more) 如果是a打开的, 有没有办法???