日期:2014-05-16  浏览次数:20380 次

【求助】Extjs给iframe赋值html
Extjs获取了Dom元素
<iframe id="iframe1"></iframe>

现在我要通过代码往这个iframe中写入一段html,比如
<p>Hello World!</p>

我是这么干的:
html="<p>Hello World!</p>";
Ext.get('iframe1').dom.html=html;

但是出来空白,请各位指教一二
extjs dom html

------解决方案--------------------
Ext.get('iframe1').dom.contentWindow.document.body.innerHTML=html;