Javascript中使用对话框,在对话框关闭时刷新前页面的方法[本页面推荐在1024x768分辩率下浏览] 文章类别:网站制作技术 | |
网站目录: 网站首页 —> 网站制作技术 | |
转载自:www.youkuaiyun.com
假设在Default.aspx中打开Dialog.aspx,则两个页面的HTML代码如下: Default.aspx:
Dialog.aspx: <%@ Page language="c#" Codebehind="Dialog.aspx.cs" AutoEventWireup="false" Inherits="MyProject.Dialog" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>Dialog</title> <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <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 RefreshOpener { opener.window.location.reload(); } </script> </HEAD> <body οnunlοad="RefreshOpener();"> <form id="Form1" method="post" runat="server"> <INPUT type="button" value="Button" οnclick="window.close();"> </form> </body> </HTML> |