后台使用脚本刷新父页面

   #region 刷新父页面
        /// <summary>
        /// 刷新父页面
        /// </summary>
        public void RefreshParentPage()
        {
            string strJS = "<script type='text/javascript'>"
                    + "var pWindow = window.parent.opener;"
                    + "if(pWindow != null && pWindow.document.all.btnQuery != null)"
                    + "{pWindow.document.all.btnQuery.click();}"
                    + "pWindow = window.parent.parent;"
                    + "if(pWindow != null && pWindow.gridframe != null && pWindow.gridframe.document.all.btnQuery != null)"
                    + "{pWindow.gridframe.document.all.btnQuery.click();}"
                    + "</script>";
            _page.Response.Write(strJS);
        }
        #endregion

 

posted @ 2025-07-31 08:00  知行一体2  阅读(6)  评论(1)    收藏  举报