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

解决方案 »

  1.   

    例子:.<script>
    var win=null
    function test()
    {
    if(win&&win.open&&!win.closed)
    win.focus()
    else
    win=window.open("edit3.htm")
    }
    </script><input onclick="test()" value=open type=button>
      

  2.   

    <script>
    var win=null
    function test()
    {
    if(win&&win.open&&!win.closed)
    alert("子窗口没有关闭")
    }
    win=window.open("")
    </script>
    <body onfocus="test()">
    test
      

  3.   

    孟斑竹,你很厉害也很热心哦,谢谢谢谢!
    那个dependent没有作用的吗?
      

  4.   

    ie中不支持这个属性。试试ns好了。
      

  5.   

    看看这个:
    http://colorweb.go.163.com/js/mengxhwindow.htm