数据分析师2017-10-01 00:53:50
How to solve the problem when JavaScript loads iFrame and it appears blank? -PHP Chinese website Q&A-How to solve the problem of blank space when JavaScript loads iFrame? -PHP Chinese website Q&A
Let’s take a look and learn.
伊谢尔伦2017-03-17 09:37:45
js加载iframe出现空白
iframeID 是加载的 Iframe ID号,修改成自己用的即可。 <iframe name="frames" id="iframeID" src=""/> setTimeout("document.frames['"+iframeID+"'].location.href='"+iurls+"';",0); //或 setTimeout("document.frames['"+iframeID+"'].location.reload();",0);
2、Button点击提交form无响应
setTimeout("form1.submit();",0);
也是用setTimeout 做下延迟执行。
下面给大家介绍如何提高iframe加载慢
<iframe name="E" u="http://www.google.com" k="0" src="javascript: void(0)" onload="alert('加载完成')"></iframe> <button onclick="aa('E')">google</button> <script defer=""> function aa(o_w) { var _z=document.all(o_w); if (_z.k=='1') { alert('页面已加载'); return; } _z.k='1'; _z.src=_z.u; } </script>