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

求教怎么在js中的panel中嵌入一个html文件
菜鸟在Ext Designer中生成的如下代码:
Ext.MyWindow=Ext.extend(Ext.Window ,{
xtype:"window",
title:"我的窗口",
width:400,
height:250,
initComponent: function(){
this.items=[
{
xtype:"tabpanel",
activeTab:0,
items:[
{
xtype:"panel",
title:"分页1",
height:192
},
{
xtype:"panel",
title:"分页2"
}

]
}
]
Ext.MyWindow.superclass.initComponent.call(this);
}
})


想在panel中加载一个html文件,这个文件中没有js,是用dreamweaver做的表格(abc.html)。刚学ext,就只知道貌似好像在panel1中加一两句话,可是不知道该怎么在中间加载,特此请教高手知道。
------解决方案--------------------
本帖最后由 showbo 于 2014-04-14 20:59:43 编辑
,Ext.MyWindow=Ext.extend(Ext.Window ,{
xtype:"window",
    title:"我的窗口",
    width:400,
    height:250,
    initComponent: function(){
        this.items=[
            {
                xtype:"tabpanel",
                activeTab:0,
                items:[
                    {
                        xtype:"panel",
                        title:"分页1",
                        height:192,
         loader : {
             url :'xxxxxxxxxxxxxxx.html',
             autoLoad : true
         }

                    },
                    {
                        xtype:"panel",
                        title:"分页2"
                    }
                     
                ]
            }
        ]
        Ext.MyWindow.superclass.initComponent.call(this);
    }
})