我动态创建了一个iframe,发现这个iframe会触发onload事件两次。var i=0; console.log(i++);
var ifr=document.createElement("iframe");ifr.src="javascript:(function(){document.open();document.write('test');document.close();})();";
这在Chrome中有效,但在IE11中失败。最终目标是构造一个新的空IFRAME,其中包含一个表单,然后提交该表单以显示实际内容。新构造的IFRAME没有body,因此document.body.appendChild失败,并显示错误"Unable to get property 'appendChild‘of undefinedor null reference“
修复此问题并创建空/占位符正文的正确方法是什么?var
问题是iframeonload没有在边缘浏览器中触发。基本上,一旦PDF加载到iframe上,我需要隐藏我的旋转器。我有问题,只有边缘,rest所有的浏览器(IE11,FF,Chrome,Safari)的工作正常。这是我的指令. .directive('pdfReport', function() {
r