onblur="windows.opener='null';window.close()" 

解决方案 »

  1.   

    如果那位仁兄的方法可行,那么下面这样就行了:
    <body onblur="windows.opener=null;window.close()">
      

  2.   

    <body onblur="windows.opener=null;window.close()">  
    ??
    这样??
    哈哈,不行吧.body失去焦点啊,,那是很常有的事啊??
    也就是说这样的方法行的话,这个窗口是很容易关掉的..但ckbf(小胖)说的是窗口失去焦点,也就是用IE时打开多个窗口,把别的窗口切换天前台时,就关掉俺的网页.是吗?
    这样子,,,俺就不晓得喽.
     
      

  3.   

    Ringfo(狂生A-9)差矣!okeyes(竹子)的HTML代码中的onblur并不是body的,而是window对象的,且看MSDN Library:
    In the absence of a "window" element, the body element hosts the following window object events: onblur, onbeforeunload, onfocus, onload, and onunload.ohno(类毒素)说的方法仅可用于IE6+,而对于IE5却不可用(出现关闭提示框),前几天看到有讨论使用组件(<object>)关闭IE的讨论,可以结合两者试试看!
      

  4.   

    谢谢大家,我的问题解决了!用的是onblur(),abent(阿木一头)所说结合组件关闭ie好象无法成功。