var editPicture = new Ext.form.FormPanel({
region:'center',
labelAlign: 'right',
labelWidth: 100,
frame: true,
autoScroll: true,
buttonAlign:'center',
defaultType: 'textfield',
items: [{
id: 'pictureId',
name: 'nameSBPictures',
fieldLabel: '縮略圖',
xtype: 'box', //或者xtype: 'component',
width: 110, //图片宽度
height: 150, //图片高度
autoEl: {
tag: 'img',src: 'images/slogo.gif'
}
}
],
buttons: [{
text: '提交',
handler: function() {
}
},
{
text: '取消',
handler: function() {
}
}]
});
設置圖片src Ext.getCmp("'pictureId'").getEl().dom.src = _PICTURE_URL;