JS子窗體刷新父窗體

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章