Javascript子窗体刷新父页面
//刷新父页面
window.opener.opener = null;
window.opener.location.replace(window.opener.location.href);
//刷新指定的父页面
window.opener.opener = null;
window.opener.navigate('index.htm');
window.opener.opener = null;
window.opener.location.replace(window.opener.location.href);
//刷新指定的父页面
window.opener.opener = null;
window.opener.navigate('index.htm');
parent.htm页面:
1<script language="JavaScript">
2<!--
3function cd()
4{
5 win=window.open("son.htm","win","width=200,height=200");
6}
7//-->
8</script>
9<input type="button" value="子页面" onclick="cd();">
10<p>
11<input type="text" name="">
2<!--
3function cd()
4{
5 win=window.open("son.htm","win","width=200,height=200");
6}
7//-->
8</script>
9<input type="button" value="子页面" onclick="cd();">
10<p>
11<input type="text" name="">
son.htm页面:
1<title>子页面</title>
2<script language="JavaScript">
3<!--
4function reflesh()
5{
6
7
8 window.opener.opener=null;window.opener.location.reload(); //实现父窗体刷新
9// window.opener.opener=null;window.opener.navigate('parent.htm'); //实现父窗体重新加载
10}
11//-->
12</script>
13<input type="button" value="刷新" onclick="reflesh();">
2<script language="JavaScript">
3<!--
4function reflesh()
5{
6
7
8 window.opener.opener=null;window.opener.location.reload(); //实现父窗体刷新
9// window.opener.opener=null;window.opener.navigate('parent.htm'); //实现父窗体重新加载
10}
11//-->
12</script>
13<input type="button" value="刷新" onclick="reflesh();">
本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利
This posting is provided "AS IS" with no warranties, and confers no rights.
This posting is provided "AS IS" with no warranties, and confers no rights.