Javascript 关闭二级显示对话框弹出窗口asp.net c#和js
作为需求的一部分,有两个显示对话框窗口在按钮单击中打开Javascript 关闭二级显示对话框弹出窗口asp.net c#和js,javascript,c#,asp.net,Javascript,C#,Asp.net,作为需求的一部分,有两个显示对话框窗口在按钮单击中打开 main.aspx在按钮上打开“显示”对话框,单击代码隐藏,如下所示: string script = "var popup1= window.showModalDialog('../modalframe.htm', 'attendees.aspx', 'options')"; ScriptManager.RegisterStartupScript(this, GetType(), "Attendee", script, true);
string script = "var popup1= window.showModalDialog('../modalframe.htm', 'attendees.aspx', 'options')";
ScriptManager.RegisterStartupScript(this, GetType(), "Attendee", script, true);
string script = "var popup2= window.showModalDialog('../modalframe.htm', 'map.aspx', 'options')";
ScriptManager.RegisterStartupScript(this, GetType(), "Map", script, true);
protected void btn_Return_Click(object sender, EventArgs e)
{
Response.Write("<script language='javascript'>window.returnValue = 1; window.parent.window.close(); </script>");
}
protectedvoid btn\u Return\u单击(对象发送方,事件参数e)
{
Write(“window.returnValue=1;window.parent.window.close();”;
}
您不使用javascript的原因是什么?它们都是现有模块,我无法更改。这也是js的一部分。欢迎你提出自己的想法。