JS子窗体刷新父窗体

来源:互联网 发布:淘宝well运动怎么样 编辑:程序博客网 时间:2024/06/05 00:53

parent.htm页面 

 程序代码
<script language="JavaScript">
<!--
function cd()
{
    win=window.open("son.htm","win","width=200,height=200");
}
//-->
</script>
<input type="button" value="子页面" onclick="cd();">
<p>
<input type="text" name="">

 

son.htm页面 

 程序代码
<title>子页面</title>
<script language="JavaScript">
<!--
function reflesh()
{
    window.opener.opener=null;window.opener.location.reload();  //实现父窗体刷新
    //window.opener.opener=null;

window.opener.navigate(’parent.htm’); //实现父窗体重新加载
}
//-->
</script>
<input type="button" value="刷新" onclick="reflesh();">

原创粉丝点击