Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.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
Html iframe内容未加载(未触发请求)_Html_Iframe - Fatal编程技术网

Html iframe内容未加载(未触发请求)

Html iframe内容未加载(未触发请求),html,iframe,Html,Iframe,我有一个问题,iframe的src没有加载,我就是不知道为什么会发生这种情况 有问题的代码: <div style="margin-left:20%;margin-right:20%; width:60%; position: absolute; top: 450px"> <iframe id="frame" name="frame" marginwidth="0" src="main.html" frameborder="0" width="100%" height="1

我有一个问题,iframe的src没有加载,我就是不知道为什么会发生这种情况

有问题的代码:

<div style="margin-left:20%;margin-right:20%; width:60%; position: absolute; top: 450px"> 
<iframe id="frame" name="frame" marginwidth="0"  src="main.html" frameborder="0" width="100%" height="1000px"></iframe></div>

当从W3schools加载到Tryit编辑器时,它可以工作(404,但这是可以理解的),并且使用Chrome的editorlight也可以工作。但是,当在实际的网站(www.wolfeh.com)上运行时,它不会加载。它甚至不发送main.html请求

有人能解释一下这是怎么回事吗

更新


太晚了,好像有人把旧代码放回去了。仍然不确定是什么,但问题已被避免。

不确定您这边发生了什么,但框架负载正常。我会尝试向其添加绝对路径,以防:

<div style="margin-left:20%;margin-right:20%; width:60%; position: absolute; top: 450px"> 
<iframe id="frame" name="frame" marginwidth="0"  src="http://wolfeh.com/main.html" frameborder="0" width="100%" height="1000px"></iframe></div>


这个框架对我来说很好。+1,在chrome、firefox和IE9中也很好(尽管IE9有奇怪的样式)