用 window.showModalDialog('webform2.aspx')打开另外一个窗口
我想在webform2打开后。。webform1不出现关闭窗口的提示 就自己关闭。 。请问要怎么写。。
在线等。。解决马上给分。
3 个解决方案
#1
上面贴错了。。不是用window.showModalDialog('webform2.aspx')开的 是用window.open()开的新窗口 麻烦大家给我看看。
#2
window.opener = null;window.close();
#3
上面的方法不行啊。。提示网页有错误
我这样写的
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
<!--
function ppppp(){
window.showModalDialog('Indexpage.aspx',)
window.opener=null;
window.close();
}
//-->
</script>
</HEAD>
<BODY MS_POSITIONING="GridLayout" onload="javascript: ppppp()" >
<form id="Form1" method="post" runat="server">
<FONT face="宋体"></FONT>
</form>
</BODY>
</HTML>
我这样写的
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
<!--
function ppppp(){
window.showModalDialog('Indexpage.aspx',)
window.opener=null;
window.close();
}
//-->
</script>
</HEAD>
<BODY MS_POSITIONING="GridLayout" onload="javascript: ppppp()" >
<form id="Form1" method="post" runat="server">
<FONT face="宋体"></FONT>
</form>
</BODY>
</HTML>
#1
上面贴错了。。不是用window.showModalDialog('webform2.aspx')开的 是用window.open()开的新窗口 麻烦大家给我看看。
#2
window.opener = null;window.close();
#3
上面的方法不行啊。。提示网页有错误
我这样写的
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
<!--
function ppppp(){
window.showModalDialog('Indexpage.aspx',)
window.opener=null;
window.close();
}
//-->
</script>
</HEAD>
<BODY MS_POSITIONING="GridLayout" onload="javascript: ppppp()" >
<form id="Form1" method="post" runat="server">
<FONT face="宋体"></FONT>
</form>
</BODY>
</HTML>
我这样写的
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
<!--
function ppppp(){
window.showModalDialog('Indexpage.aspx',)
window.opener=null;
window.close();
}
//-->
</script>
</HEAD>
<BODY MS_POSITIONING="GridLayout" onload="javascript: ppppp()" >
<form id="Form1" method="post" runat="server">
<FONT face="宋体"></FONT>
</form>
</BODY>
</HTML>