html 文件代码:
<div id="north">north north north north north north north north north north</div>
<div id="south">south south south south south south south south south south</div>
<div id="center">center center center center center center center center center</div>
js代码:
new Ext.BoxComponent({
region:'north',
el:'north',
height:"40"
})
结果在页面上显示3个div的内容,这是为什么?
页面图如下面的附件中显示。
[code="js"]new Ext.ViewPort({
layout: 'border',
items: [{
region: 'north',
xtype: 'box',
applyTo: 'north',
height: "40"
},
{
xtype: 'panel',
regon: 'center',
contentEl:'center'
},
{
xtype: 'panel'
region: 'south',
contentEl:'south'
}]
});[/code]
el = element
这两行你可以删除掉
[code="js"]new Ext.ViewPort({
layout: 'border',
items: [{
region: 'north',
xtype: 'box',
applyTo: 'north',
height: "40"
},
{
xtype: 'panel',
regon: 'center',
html: 'center center center center center center center center center' //或者 contentEl:'center'
},
{
xtype: 'panel'
region: 'south',
html: 'south south south south south south south south south south' //或者 contentEl:'south'
}]
});[/code]