图片已经在服务器../../photo目录下
可以点编辑时候打开在页面for里面有个box里面可以预览出来
点编辑时候json传递过来数据如下:
ajax json load string = {success:true,totalProperty:1,root:[{engineer_id:'aaa',engineer_name:'aaaa',phoneno:'11111',mobileno:'1111',engineer_photo:'bbb.jpg',createdate:'2012-05-28'}]}
里面engineer_photo 即为显示的图片名称
现在如何在下面的BOX里面显示出来
{ inputType:"file", id: 'engineer_photo', emptyText: '请选择', fieldLabel: '选择头像', name: 'engineer_photo' } , { xtype : 'box', id : 'imageBrowse', fieldLabel : "预览", width : 100, autoEl : { width : 100, height : 100, tag : 'img', src : '../../photo/ '+.../*此处如何得到路径*/, style : 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);', complete : 'off', id : 'imageBrowse' } }
src里面改为绝对路径是可以显示的