要有父子关系(或者说亲戚关系)才能关闭,否则你无法找到其它的窗口啊。
只要能找到这个窗口,你用typeof来判断窗口是object还是undefined
你试试

解决方案 »

  1.   

    closed Property--------------------------------------------------------------------------------Retrieves whether the referenced window is closed.Syntax[ bClosed = ] window.closed
    Possible ValuesbClosed Boolean that receives one of the following values.false Default. Window is open. 
    true Window is closed. 
     The property is read-only. The property has a default value of false.