关闭窗口的三种方式
一、
<OBJECT id=hh type="application/x-oleobject" width=0 height=0
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="Close">
</OBJECT>
<A HREF="#" onclick="hh.Click()">CLOSE ME</A><BR>
<A HREF="#" onclick="javascript:top.opener=null;top.close();">CLOSE</A>
<object classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" id=closewin></object>
<input type="button" value="close" onclick="closewin.ExecWB(45,1)">
二、
IE窗口自动关闭
//IE6+SP1以下有效
<OBJECT id=closeit classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM NAME="Command" VALUE="Close"></OBJECT>
<a href="javascript:closeit.Click()">点这里关闭窗口</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)>
三、自己关闭自己
Response.Write("<script language='javascript'>")
'Response.Write("window.close();")
Response.Write("top.opener=null;top.close();")
Response.Write("</script>")