Ext.onReady(init);
function init(){
try{
var view=Ext.Viewport({
layout:"border",
items:[
{region:'north',height:60,title:'north'},
{region:'south',height:60,title:'south'},
{region:'west',width:60,title:'west'},
{region:'east',width:60,title:'east'},
{region:'center',title:'center'}
]
});
}catch(e){
alert(e.message);
}
};
报错:this.addEvents is not a function why?
------解决方案--------------------
onready
{
}
全部包完
------解决方案--------------------
var view=new Ext.Viewport({ 少了个new