<p>可以使用JavaScript监听iframe的加载状态,当iframe加载完成后,可以使用window.stop()方法阻断网页加载。代码如下:</p>
<html>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<title>fhcs</title>
<body style="margin:0;padding:0;height:100%" scroll=no>
<iframe id="infrm" name="infrm" marginwidth="0" marginheight="0" width="100%" scrolling=auto src="http://fh.9a18.cn" frameborder="0" height="100%"></iframe>
<script>
var iframe = document.getElementById('infrm');
iframe.addEventListener('load', function() {
    window.stop();
});
</script>
</html
加一个功能让iframe加载完成后阻断网页加载htmlmeta content=width=device-width initial-scale=10 maximum-scale=10 user-scalable=0 name=viewport titlefhcstitlebody style=margin0;padding0;height100 scroll=noiframe id=infrm

原文地址: https://www.cveoy.top/t/topic/dYDT 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录