下面是我的代码 top对象是我从Ext2.2api中拿来的 当不把Ext2.2中的js包和css包加进来时, 在top定义时报缺少对象 但是当我把Ext2.2中的js包和css包加进来时 它又报Ext.EventObject不存在,郁闷 求答案 小弟在此谢过了
var top = new Ext.FormPanel({
labelAlign: 'top',
frame:true,
title: 'Multi Column, Nested Layouts and Anchoring',
bodyStyle:'padding:5px 5px 0',
width: 600,
items: [{
layout:'column',
items:[{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: 'First Name',
name: 'first',
anchor:'95%'
}, {
xtype:'textfield',
fieldLabel: 'Company',
name: 'company',
anchor:'95%'
}]
},{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: 'Last Name',
name: 'last',
anchor:'95%'
},{
xtype:'textfield',
fieldLabel: 'Email',
name: 'email',
vtype:'email',
anchor:'95%'
}]
}]
},{
xtype:'htmleditor',
id:'bio',
fieldLabel:'Biography',
height:200,
anchor:'98%'
}],
buttons: [{
text: 'Save'
},{
text: 'Cancel'
}]
});
var sendnotedlg;
var win;
function sendshow(btn){
if(!win){
win = new Ext.Window({
title : '维护通知',
closable : true,
layout : 'hbox',
width : 600,
height : 450,
items : top
});
}
win.show();
}