写入IFRAME的innerHTML [英] Writing to an IFRAME's innerHTML

查看:97
本文介绍了写入IFRAME的innerHTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置包含的IFRAME的innerHTML属性?


非常感谢提前,


Aaron

解决方案

" Aaron Gray" < an ******** @ gmail.comwrote in message

news:6h ************ @ mid.individual.net ...


如何设置包含的IFRAME的innerHTML属性?



我得到了


window.frames [" results"]。document.body.innerHTML


这适用于FF和Opera,但不适用于IE。


Aaron



" Aaron Gray" < an ******** @ gmail.comwrites:


" Aaron Gray" < an ******** @ gmail.comwrote in message

news:6h ************ @ mid.individual.net ...


>如何设置包含的IFRAME的innerHTML属性?



我得到了


window.frames [" results"]。document.body.innerHTML


这适用于FF和Opera,但不适用于IE。



IIRC,window.frames [" results"]。document.contentWindow .document.body.innerHTML


应该适用于IE。


-

Joost Diepenmaat |博客: http://joost.zeekat.nl/ |工作: http://zeekat.nl/



" Joost Diepenmaat" < jo *** @ zeekat.nlwrote in message

news:87 ************ @ zeekat.nl ...


Aaron Gray < an ******** @ gmail.comwrites:


>" Aaron Gray" < a ******** @ gmail.com写信息
新闻:6h ************ @ mid.individual.net ...
< blockquote class =post_quotes>
>>如何设置包含的IFRAME的innerHTML属性?


我得到了

window.frames [" results"]。document.body.innerHTML

这适用于FF和Opera,但不在IE上。



IIRC,

window.frames [" results"]。document.contentWindow.document.body .innerHTML


应该适用于IE。



window.frames [" result"]。document.contentWindow.document


说上面是null或者不是一个对象。


我有一个IFRAME: -


< iframe id =" result" name =" result">< / iframe>


很困惑,他们肯定会让这些东西变得简单!


Aaron

How do I set the innerHTML property of a contained IFRAME ?

Many thanks in advance,

Aaron

解决方案

"Aaron Gray" <an********@gmail.comwrote in message
news:6h************@mid.individual.net...

How do I set the innerHTML property of a contained IFRAME ?

I got

window.frames["results"].document.body.innerHTML

This works on FF and Opera, but not on IE.

Aaron



"Aaron Gray" <an********@gmail.comwrites:

"Aaron Gray" <an********@gmail.comwrote in message
news:6h************@mid.individual.net...

>How do I set the innerHTML property of a contained IFRAME ?


I got

window.frames["results"].document.body.innerHTML

This works on FF and Opera, but not on IE.

IIRC, window.frames["results"].document.contentWindow.document.body.innerHTML

should work on IE.

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/



"Joost Diepenmaat" <jo***@zeekat.nlwrote in message
news:87************@zeekat.nl...

"Aaron Gray" <an********@gmail.comwrites:

>"Aaron Gray" <an********@gmail.comwrote in message
news:6h************@mid.individual.net...

>>How do I set the innerHTML property of a contained IFRAME ?


I got

window.frames["results"].document.body.innerHTML

This works on FF and Opera, but not on IE.


IIRC,
window.frames["results"].document.contentWindow.document.body.innerHTML

should work on IE.

window.frames["result"].document.contentWindow.document

Is saying the above is null or not an object.

I have an IFRAME thus :-

<iframe id="result" name="result"></iframe>

Confused, they sure do make this stuff easy !

Aaron


这篇关于写入IFRAME的innerHTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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