?????????????
Ext.onReady(function(){ new Ext.Window({ title:'添加人员', height:300, width:500, layout:'form', defaultType:'textfield', labelWidth:55, plain:true, items:[{ xtype:'panel', baseCls:'x-plain', layout:'column', style:'padding:5px', items:[{ columnWidth:.5, layout:'form', labelWidth:55, defaultType:'textfield', baseCls:'x-plain', defaults:{width:160}, items:[{ fieldLabel:'姓名' },{ fieldLabel:'年龄' },{ fieldLabel:'出生日期' },{ fieldLabel:'联系电话' }] },{ columnWidth:.5, layout:'form', baseCls:'x-plain', items:[{ xtype:'textfield', fieldLabel:'个人照片', inputType:'image', width:120, height:150, id:'img' }] }] },{ fieldLabel:'身份证号', width:400 },{ fieldLabel:'地址', width:400 }], buttons:[{ text:'确定' },{ text:'取消' }], showLock:false, listeners:{ //不是render,rendered 'show':function(_window){ //alert(_window.findByType('textfield')[4].fieldLabel); if(!_window['showLock']){ _window.findByType('textfield')[4].getEl().dom.src='images/logo.jpg'; _window['showLock'] = true; } /** * getEl()得到当前ExtJS组件对象的元素对象, * */ } } }).show(); });
?
?
1 楼
longhua828
2011-01-18