<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>
  window.onload = function() {
    window.stop();
  };
</script>
</html>
<p>上述代码中,当整个网页加载完成后,window.onload 事件触发,然后立即调用 window.stop() 方法,停止整个网页加载,包括 iframe 中的内容。</p>
如何使用 JavaScript 停止网页加载:iframe 加载完成后立即停止

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

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