管延文

管延文程序空间 QQ:27651302

导航

父子不同窗口间刷新传值

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();">

 

posted on 2011-09-28 10:46  tiger8000  阅读(248)  评论(0编辑  收藏  举报