我试了下面这么多方法,还是不行:
×××××××××××××××××××
<input type="button" name="Button" value="保存页面" onClick="document.all.WebBrowser.ExecWB(4,1)" >
<input type="button" name="Button" value="关闭窗口" onClick="document.all.WebBrowser.ExecWB(45,1)">
<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>
×××××××××××××××××××
window.opener=null;
window.close();
×××××××××××××××××××
<OBJECT id=closewin type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><param name="Command" value="Close"></object>
<script language="javaScript">
closewin.Click();
</script>
×××××××××××××××××××<object ID='WebBrowser1' WIDTH=0 HEIGHT=0 CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>
<input type=button value="print" onclick="document.all.WebBrowser1.ExecWB(6,1)">
<input type=button value="PageSetting" onclick="document.all.WebBrowser1.ExecWB(8,1)">
<input type=button value="Save" onclick="document.all.WebBrowser1.ExecWB(4,1)">
<input type=button value="PrintPreview" onclick="document.all.WebBrowser1.ExecWB(7,1)">
<input type=button value="Close" onclick="document.all.WebBrowser1.ExecWB(2,1)">
<input type=button value="无提示关闭" onclick="document.all.WebBrowser1.ExecWB(45,2)">
<input type=button value="无提示关闭" onclick="document.all.WebBrowser1.ExecWB(45,1)">
×××××××××××××××××××
window.opener.location.reload(true);
self.close()
×××××××××××××××××××
<input type="button" name="Button" value="保存页面" onClick="document.all.WebBrowser.ExecWB(4,1)" >
<input type="button" name="Button" value="关闭窗口" onClick="document.all.WebBrowser.ExecWB(45,1)">
<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>
×××××××××××××××××××
window.opener=null;
window.close();
×××××××××××××××××××
<OBJECT id=closewin type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><param name="Command" value="Close"></object>
<script language="javaScript">
closewin.Click();
</script>
×××××××××××××××××××<object ID='WebBrowser1' WIDTH=0 HEIGHT=0 CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>
<input type=button value="print" onclick="document.all.WebBrowser1.ExecWB(6,1)">
<input type=button value="PageSetting" onclick="document.all.WebBrowser1.ExecWB(8,1)">
<input type=button value="Save" onclick="document.all.WebBrowser1.ExecWB(4,1)">
<input type=button value="PrintPreview" onclick="document.all.WebBrowser1.ExecWB(7,1)">
<input type=button value="Close" onclick="document.all.WebBrowser1.ExecWB(2,1)">
<input type=button value="无提示关闭" onclick="document.all.WebBrowser1.ExecWB(45,2)">
<input type=button value="无提示关闭" onclick="document.all.WebBrowser1.ExecWB(45,1)">
×××××××××××××××××××
window.opener.location.reload(true);
self.close()
解决方案 »
- 请教 Spring Security
- 帮帮忙啊
- 求救!如何在JSP中向变量赋值???麻烦进来看看!!谢谢前辈们了!!
- 【菜鸟请教】java如何发送soap请求
- 生成多余了的代码JBUILDER<jsp:forward page="object.jsp"/></jsp:forward>,可以生成没有后面的吗?
- CSDN史上分数最大的问题,3000分请教如何用Java开发门户网站(之七 设计模式)
- JSP为什么不能显示中文
- 初学者问题:jsp编译的问题
- jboss-3.0.0_tomcat-4.0.3 连接sql-server,驱动放在jboss-3.0.0_tomcat-4.0.3/server/default/lib目录下可是提示找不到驱动,请问大虾们
- 新手问ExtJS的表格问题
- 我这样操作文件有错误吗?
- 求一日历操类代码
<html >
<head>
<title></title>
<script language="javascript">
function close(){
parent.window.close();
}
</script>
</head> <body >
<input type="button" onclick="close" value="关闭">
</body >
</html>
对了,我要求的是关闭自身的窗口,而不是子窗口,下面是关闭子窗口的,我这可以的
<head>
<script language = "javascript">
var wid
function b1click(){
wid = open("TEST2.HTM","new","toolbar=yes;menubar=yes");
}function b2click(){
wid.close();
}
</script>
</head>
<form>
<input type="button" value="Open" onclick="b1click()">
<input type="button" value="Close" onclick="b2click()">
</form>
window.parent.cllse();
如果还不行,明天来关吧,明天就可以了。
<%Response.Write "<script language=JavaScript>{parent.location.href = '/';}</script>"%>
这样就可以了
window.close()就可以关了啊.如果在frame里执行的话就改成top.window.close();
试试吧