【发布时间】:2016-11-17 07:39:25
【问题描述】:
我在 html 中有一个 iframe,其中有一个 onload 函数。在 IE11 中,onload 函数被调用了两次,而在 chrome 中它工作正常。
HTML:
<iframe src="someurl" onload="someFunction()"></iframe>
JS:
function someFunction() {
$window.scroll(0, 0);
if (count > 0) {
$ctrl.iframeHeight = '1000px';
$scope.$digest();
}
return count++;
}
someFunction() 在 IE11 中被调用了两次。
【问题讨论】:
-
someFunction() 里面有什么?可能会造成一些冲突。
-
显示你的代码你在
someFunction()里面写了什么。所以我们可以帮助你。
标签: javascript html angularjs iframe