Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.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上的超时_Javascript_Html_Web - Fatal编程技术网

Javascript 禁用iFrame上的超时

Javascript 禁用iFrame上的超时,javascript,html,web,Javascript,Html,Web,我正在制作一个家庭控制器,我正在使用iFrames收集不同的页面,以获取同一网站上的所有内容。我有一个页面,我有一台远程计算机,它并不总是开着,所以我现在在加载的时候制作了一个加载图像和一个切换开关。但过了一段时间,iframe发布了一条信息:“响应时间太长了”。我可以禁用它并使其永久加载吗?这将有助于在源中断且未加载时修复它 <script> $(function () { $("iframe").not(":has([src

我正在制作一个家庭控制器,我正在使用iFrames收集不同的页面,以获取同一网站上的所有内容。我有一个页面,我有一台远程计算机,它并不总是开着,所以我现在在加载的时候制作了一个加载图像和一个切换开关。但过了一段时间,iframe发布了一条信息:“响应时间太长了”。我可以禁用它并使其永久加载吗?

这将有助于在源中断且未加载时修复它

<script>
    $(function () {

        $("iframe").not(":has([src])").each(function () {

        var ifrm = this;

        ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;

        ifrm.document.open();
        ifrm.document.write($(this).attr("alt"));
        ifrm.document.close();

        });

    });
</script>

$(函数(){
$(“iframe”).not(“:has([src])”).each(function(){
var-ifrm=此;
ifrm=(ifrm.contentWindow)?ifrm.contentWindow:(ifrm.contentDocument.document)?ifrm.contentDocument.document:ifrm.contentDocument;
ifrm.document.open();
ifrm.document.write($(this.attr(“alt”));
ifrm.document.close();
});
});

SO不是免费的家庭作业服务。