在IE中未触发iFrame的加载事件 [英] Load event for iFrame not fired in IE

查看:294
本文介绍了在IE中未触发iFrame的加载事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么IE for iFrames中没有触发加载事件?

Why is the load event not fired in IE for iFrames?

请看一下这个例子

在FF和Chrome中完美按预期工作,但IE失败了。

Work perfectly as expected in FF and Chrome, but IE fails.

推荐答案

我认为对于Internet Explorer中的iframe,你无法以编程方式设置该事件处理程序(onload),需要在你的标记中指定它。

I think for iframes in Internet Explorer you can't set that event handler (onload) programmatically, you need to specify it in your markup.

类似于:

<iframe id="myFrame" onload="myFunction();"></iframe>

否则IE只会忽略该功能。

Otherwise IE is just going to ignore the function.

这篇关于在IE中未触发iFrame的加载事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆