父子不同窗口间刷新传值

1、刷新当前页 写在 html 中

<a href="javascript:window.location.reload();">刷新</a>

 2、跳转 ,写在 html 中

function gotourl(url)
{
    
    //window.top.PageFrame.location.href= url; //框架时用
    window.location.href=  url;
}

使用方法:

gotourl('SearchMessage.aspx');

3、

刷新父窗口,同时关闭当前这个打开的子窗口,写在 C# 代码里。

Response.Write("<script>window.opener.location.reload();</script>");
Response.Write("<script>window.alert('此信息彻底删除!');window.opener=null;window.close();</script>");

4、

<body onload="opener.location.reload()">
开窗时刷新父窗口
<body onunload="opener.location.reload()">
关窗时刷新父窗口


<body onload="window.opener.location.reload();">
原文地址:https://www.cnblogs.com/tiger8000/p/2193929.html