Load event for iFrame not fired in IE

前端 未结 7 1498
无人及你
无人及你 2020-12-09 02:46

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

Please take a look at this example.

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

相关标签:
7条回答
  • 2020-12-09 03:46

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

    Something like:

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

    Otherwise IE is just going to ignore the function.

    0 讨论(0)
提交回复
热议问题