a页面中有一个iframe指向b,在b中用window.open弹出页面c, 在c中刷新a页面(opener.parent),此时c已经失去了opener的引用,也就是说再通过opener是找不到b页面的,那么如果还想刷新a页面怎么做?????
解决方案 »
- ajax传参data里面的键是一个变量怎么办?
- 如何做到 输入网址就可以播放YOUKU\土豆、新浪的视频。。
- 求助手机号码提示效果
- 寻求类似 mBox 的,但是是基于jquery或javascript的
- 图片等比缩放问题!急!!在线=====
- 获取节点名求助
- 急!一个有难度的问题
- <input type=button value=怎样得到iframe中的源文件,或文本?><p><iframe src="http://www.google.com"></iframe><p><textarea>在这里
- text框中怎样捕捉光标位置
- 如何用JS程序来设定radio的checked属性?在线等待!!
- var a = new A();和var a = {};A.call(a);一样吗?
- this._io = open || false是什么意思
然后在C中再次刷新A。
a.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body bgcolor=red>
this is a
<iframe name=tt id=tt src="b.html" width=100%></iframe>
</body>
</html>
<script language="JavaScript">
window.onload=function()
{
alert("刷新了");
}
function aa(){
window.location=window.location;
}
</script>
b.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body bgcolor=green>
<input type=button value="open c.html" onclick="window.open('c.html')">
</body>
</html>
<script language="JavaScript">
function bb()
{
parent.aa();
} </script>
c.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body bgcolor="yellow">
<input type="button" value="refresh a.html" onclick="cc()">
</body>
</html><script language="JavaScript">
function cc()
{
window.opener.bb();
} </script>