try:
closewin=setTimeout('window.opener=null;window.close()',300)

解决方案 »

  1.   

    如果是window.open()打开的窗口,就不会有这个提示.
    如果不是,则会有这个提示.
    取消这个提示的方法://IE6+SP1以下有效
    <OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" ><param name="Command" value="Close"></object>
    <input type=button value=关闭 onclick="closes.click();">Close</a>//IE5.5以上有效
    <input type=button value=关闭 onclick="window.opener='null';window.close()">//IE5.5以上有效
    <OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0></OBJECT><input type=button value=关闭窗口 onclick=document.all.WebBrowser.ExecWB(45,1)>