Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/454.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用另一iframe中的链接更新iframe_Javascript_Html_Iframe - Fatal编程技术网

Javascript 使用另一iframe中的链接更新iframe

Javascript 使用另一iframe中的链接更新iframe,javascript,html,iframe,Javascript,Html,Iframe,我面临着同样的问题,在这个链接上讨论。但解决方案是不适合我 在firebug中,我得到了错误 top.document.getElementById(“magazineContents”)为空 找到答案。请参见下面的注释iframe中的页面是否与其父页面位于同一域中?感谢您的回复。这只是在iframe元素的id周围添加双引号的简单问题,例如:top.document.getElementById(“myID”).src=“链接”

我面临着同样的问题,在这个链接上讨论。但解决方案是不适合我

在firebug中,我得到了错误 top.document.getElementById(“magazineContents”)为空


找到答案。请参见下面的注释

iframe中的页面是否与其父页面位于同一域中?感谢您的回复。这只是在iframe元素的id周围添加双引号的简单问题,例如:top.document.getElementById(“myID”).src=“链接”