IE8下如何改变其他窗口的属性? 比如说A窗口->B窗口->C窗口以上都是用的window.open()方式。我如何在A窗口里改变C窗口的属性?比如说改变C窗口的URL,然后刷新? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var C = window.open();C.url = 'http://www.baidu.com'; to:MuBeiBei这么写的话,在IE8下会不会新弹出一个窗口??变成D窗口了? 在你C窗口不也是window.open弹出的吗前面写个变量接受,然后改url就成了 你应该是B窗口里面有window.open这个,这个应该就是C窗口在B窗口里写var C = window.open();C.url = ''; 问题是我现在想从A窗口直接改变C窗口的URL,然后刷新。。我在A窗口里能直接获得C窗口的对象吗?(中间隔一层B窗口) 我刚才试了一下,IE新开了一个窗口,而不是在C窗口上刷新。。 A 里面写var b=window.open("b",urlb);b里面写var c=window.open("c",urlc);A里面写alert(b.c.document.body.innerHTML());但是得保证b c里面的页面加载完毕 A页面:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body> <input id="stop" type="button" value="stop" /> <input id="start" type="button" value="start" /> <script type="text/javascript"> var b; document.getElementById('stop').onclick = function(){ b = window.open('B.html'); }; var c = setInterval(function(){ if(document.getElementById('start').value == 'true'){ b.c.window.location = '11111111111111'; } },1000); </script></body></html>B页面:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文11111档</title></head><body><input id="stop" type="button" value="stop" /><script type="text/javascript"> var c; document.getElementById('stop').onclick = function(){ c = window.open('C.html'); opener.document.getElementById('start').value = 'true'; }; </script></body></html>C页面:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body> </body></html> 这段代码什么意思top.location=self.location; 求一段js代码 请教:对象还是正则表达式的问题? 如何执行本页所包含iframe的页面中的一个函数? JavaScript有判断一个串是不是数字的函数吗? 200分求正则,为html里面缺少"的属性加上引号。 这个JS函数中的参数为什么取不到? 动态增加表格中的字段 一个愚蠢的问题,javascript有调试工具吗 为什么用JS的返回值赋值后,字符串的长度大幅增加,但显示正常 求助 关于在表格里添加一个按钮 jquery+ajax 获取系统时间
C.url = 'http://www.baidu.com';
这么写的话,在IE8下会不会新弹出一个窗口??变成D窗口了?
在你C窗口不也是window.open弹出的吗前面写个变量接受,然后改url就成了
你应该是B窗口里面有window.open这个,这个应该就是C窗口
在B窗口里写
var C = window.open();
C.url = '';
问题是我现在想从A窗口直接改变C窗口的URL,然后刷新。。
我在A窗口里能直接获得C窗口的对象吗?(中间隔一层B窗口)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<input id="stop" type="button" value="stop" />
<input id="start" type="button" value="start" />
<script type="text/javascript">
var b;
document.getElementById('stop').onclick = function(){
b = window.open('B.html');
};
var c = setInterval(function(){
if(document.getElementById('start').value == 'true'){
b.c.window.location = '11111111111111';
}
},1000);
</script></body>
</html>
B页面:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文11111档</title>
</head><body>
<input id="stop" type="button" value="stop" />
<script type="text/javascript">
var c;
document.getElementById('stop').onclick = function(){
c = window.open('C.html');
opener.document.getElementById('start').value = 'true';
};
</script>
</body>
</html>
C页面:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
</body>
</html>