id : 'signdoctor-iconPath',
name : 'iconPath',
xtype : 'textfield',
fieldLabel : '照片:',
inputType : 'image',
anchor : '30%'
Ext.getCmp('signdoctor-iconPath').setValue("<img src='"+result.iconPath+"'/>");
最终只是在文本框中出现<img src="" />这句话,如何在文本框中显示对应的图片呢?请大家指教
Ext.create('Ext.panel.Panel', {
renderTo: document.body, title: 'test'
, layout: { type: 'hbox', align: 'middle' }
, items: [{ xtype: 'label', text: '照片:', margin: '10 0 0 0' },
{
id: 'signdoctor-iconPath',
name: 'iconPath',
xtype: 'box',
autoEl: {
tag: 'img',
src: 'aa.jpg',
width: 100,
height: 100
}
}]
});
http://ask.csdn.net/questions/242112