网上一大堆extjs关于设置textfield不可编辑的分享,却没有提到 Ext.getCmp('paramId'+i).getEl().dom.disabled =false在IE浏览器里不兼容问题,为了这个问题折腾2个小时,现在分享下,直接用 Ext.getCmp('paramId'+i).setDisabled(false);
if(Ext.getCmp('paramId'+i)!=null && Ext.getCmp('paramId'+i)!=undefined){
// Ext.getCmp('paramId'+i).getEl().dom.readOnly = modifyParam;
// Ext.getCmp('paramId'+i).getEl().dom.disabled = modifyParam;
Ext.getCmp('paramId'+i).setDisabled(modifyParam);
Ext.getCmp('paramId'+i).getEl().setStyle({
'color': 'black'
})
}