a simple one, only works in IE5.5/6<input type=button value=close onclick="javascript:top.opener=null;top.close();">

解决方案 »

  1.   

    <input type="button" value="close" onclick="javascript:window.close()">
      

  2.   

    button 的onclick=window.close()就好了,不过对于不是windown.open打开的窗口会出现对话框
    <input type="submit" name="Submit" value="提交" onClick="window.opener=null;window.close();">
    这样就好了
      

  3.   

    <OBJECT id=rtopics type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
    <PARAM name="Command" value="Close">
    </OBJECT>
    <button onclick="JavaScript:rtopics.Click()">CLose</button>
    <OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>
    <button onclick="JavaScript:WebBrowser1.ExecWB(45, 2);">CLose</button>
    the first might not work under windows 2003 server