问题描述如下:
点击主页A中的某个超链接,弹出页面B,然后点击页面B中的某个超链接,弹出页面C,同时自动关闭页面B,,,,,,,等等,假如一直到页面X,有没有办法,在最末层的页面X,调用一段代码,刷新祖先页面A??也就是利用js,刷新指定的页面A?无论在哪个阶段,可以固定刷新指定的页面A?
点击主页A中的某个超链接,弹出页面B,然后点击页面B中的某个超链接,弹出页面C,同时自动关闭页面B,,,,,,,等等,假如一直到页面X,有没有办法,在最末层的页面X,调用一段代码,刷新祖先页面A??也就是利用js,刷新指定的页面A?无论在哪个阶段,可以固定刷新指定的页面A?
a.htm
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>a</title>
</head><body>
当你可以再次点击按钮说明该页面已经刷新过
<input type=button id="b" value="open b" onclick="window.open('b.htm');this.disabled=true;">
</body></html>
b.htm
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>b</title>
<script defer>
var a = window.opener;
window.open("c.htm");
</script>
</head><body></body></html>
c.htm
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>c</title>
<script defer>
var b = window.opener;
var a = b.a;
b.close();
a.location = a.location;
</script>
</head><body></body></html>
{
location.href=window.location.href;
}