Extjs 4:创建iFrame窗口 [英] Extjs 4: Create an iFrame Window
问题描述
我需要在Extjs中创建一个iFrame窗口。以前在ExtJS 3.x中我会这样做:
I am in need of creating an iFrame Window in Extjs. Previously in ExtJS 3.x I would do this:
bodyCfg: {
tag: 'iframe'
}
但是窗口
ExtJS类没有一个bodyCfg。
But the Window
Class of ExtJS 4 seems not to have a bodyCfg.
有关如何制作iFrame ExtJS 4窗口的任何想法?
Any ideas on how to make an iFrame ExtJS 4 Window?
推荐答案
我认为 autoEl
是你正在寻找的...
I think autoEl
is what you are looking for...
在Ext 4.x中的一些建议不要使用 autoEl
作为窗口
配置属性,它可以使您的窗口格式错误..我建议您在组件
(窗口项目)中使用 autoEl
Some advice from me, in Ext 4.x don't use autoEl
as a window
config property, it can make your window malformed.. I suggest you to use autoEl
in a component
(items of your window)
new Ext.Window({
title : "iframe",
width : 300,
height: 300,
layout : 'fit',
items : [{
xtype : "component",
autoEl : {
tag : "iframe",
src : "http://www.yahoo.com"
}
}]
}).show();
上面的代码比
new Ext.Window({
title : "iframe",
width : 300,
height: 300,
layout : 'fit',
autoEl : {
tag : "iframe",
src : "http://www.yahoo.com"
}
}).show();
注意:当前,您无法在iframe中加载Google和Facebook
Note: currenty you can't load Google and Facebook inside an iframe
这篇关于Extjs 4:创建iFrame窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!