window.opener = null;
window.open("", "_self");
window.close();
我用如下的代码效果是,我点一下button,会弹出一个新的窗口,继续点button才会关闭,这是什么问题啊?请赐教了!
window.open("", "_self");
window.close();
我用如下的代码效果是,我点一下button,会弹出一个新的窗口,继续点button才会关闭,这是什么问题啊?请赐教了!
FormValue window = new FormValue();//FormValue 是我创建的一个窗口
window.Show();
window.Close();运行后窗口一闪就自动关闭,没问题
window.open("", "_self");
return;我点一下button,会弹出一个新的窗口,继续点button才会关闭,这个是因为浏览器防止恶意关闭
window.showModalDialog()才是模式窗口。你的关闭是什么按钮执行的?
winm.close();
<script>
var winm = window.open();
winm.close();
</script>
window.opener =null;
window.open('','_self','');
window.top.close();
<head>
<title>
<base target="_self"></title>
</head>
<body>
</body>
</html>
winm.close();
function ADD(id) {
var leftmar = (window.screen.width - 950) / 2;
var topmar = (window.screen.height - 650) / 2;
var count = window.showModalDialog(xxx.aspx?eid='+id, '提示', 'dialogHeight=570px; dialogWidth=1000px; dialogTop=' + topmar + '; dialogLeft=' + leftmar + ';status=no');
if (count == 1)
window.location.reload(); //刷新页面 }后台:
Page.ClientScript.RegisterStartupScript(Page.GetType(), "alertFun", "<script type='text/javascript'>alert('成功!');window.returnValue=1;window.close();</script>");
按照你的方法父窗体不能刷新,不断提示我要重试,这个怎样解决呢?
<script language=javascript> var arr = window.showModalDialog('" + URL + "','','dialogWidth:" + Win_Width + "px;"
+ "dialogHeight:" + Win_Hight + "px;status:0');if(arr == 1) {window.location.reload();}</script>模式窗口中是
<script language=javascript>window.opener = null;window.returnValue=1;window.close();</script>
总是提示我要重试,这要怎么解决呢?