开发者

iframe.contentWindow on IE8?

开发者 https://www.devze.com 2023-01-10 10:13 出处:网络
I have anelement on page: <iframe vspace=\"0\" hspace=\"0\" style=\"overflow-y:auto;overflow-x:auto;word-wrap:break-word;border:0px;\"

I have an element on page:

<iframe vspace="0" hspace="0"
    style="overflow-y:auto;overflow-x:auto;word-wrap:break-word;border:0px;"
    id="some-iframe"></iframe>

and I'm trying to get contentWindow property of t开发者_JAVA百科his frame using the following javascript:

document.getElementById('some-iframe').contentWindow

It's ok under at least FF, Opera, Chrome, but under IE8 I get:

>>> document.getElementById('some-iframe').contentWindow
[ ]

What's there wrong and how do I get contentWindow object under IE8?


Stupid I, the "problem" is solved, [] is just FireBug Lite strange behavior.

0

精彩评论

暂无评论...
验证码 换一张
取 消