关于关闭对话框的问题??
我在父页面使用window.showModalDialog()打开一个对话框,这是父页面,点击“选择”按钮打开对话框:
这是对话框:
对话框中有一个<button id="Button1" onclick="closed()">关闭</button>按钮,
function closed() {
window.opener = null;
window.close();
}
点击后正常应该是关闭对话框。
我为什么我点击后的结果却是对话框关闭了,但是却打开了一个新的页面中再次打开了该对话框???
如下图:
实在是搞不明白,请各位大侠指点!!!!
以下是对话框页面的页面代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="baseDataValuesetDialog.aspx.cs" Inherits="baseDataValuesetDialog" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<LINK href="Images/index/YHChannelApply.files/Style.css" type=text/css rel=stylesheet />
<LINK href="Images/index/YHChannelApply.files/Manage.css" type=text/css rel=stylesheet />
<style type="text/css">
.tdclass
{
text-align:right;
}
.manageHead1 {
BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; COLOR: #000000; BORDER-BOTTOM: #cccccc 1px solid;
}
</style>
</head>
<script type="text/javascript">
function closed() {
window.opener = null;
window.close();
}
</script>
<body>
<form id="form1" runat="server">
<div>
<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
<TBODY>
<TR>
<TD width=15><IMG src="Images/index/YHChannelApply.files/new_019.jpg" border=0 /></TD>
<TD width="100%" background=Images/index/YHChannelApply.files/new_020.jpg height=20></TD>
<TD width=15><IMG src="Images/index/YHChannelApply.files/new_021.jpg" border=0 /></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
<TBODY>
<TR>
<TD width=15 background=Images/index/YHChannelApply.files/new_022.jpg>
<IMG src="Images/index/YHChannelApply.files/new_022.jpg" border=0 />
</TD>
<TD vAlign=top width="100%" bgColor=#ffffff>
<TABLE cellSpacing=0 cellPadding=5 width="100%" border=0>
<TR>
<TD class=manageHead>当前位置: <asp:Label ID="lb_url" runat="server"></asp:Label></TD>
</TR>
<TR>
<TD height=2>
</TD>
</TR>
</TABLE>
<TABLE bor