日期:2014-05-16 浏览次数:20439 次
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'checkboxfield',
onclick: 'chk(this,0)',
fieldLabel: 'Label',
name: 'che',
boxLabel: 'Box Label',
listeners: {
activate: {
fn: me.chk,
scope: me
}
}
},
{
xtype: 'textfield',
disabled: true,
fieldLabel: 'Label',
name: 'textfield'
}
]
});
me.callParent(arguments);
},
chk: function(component, eOpts) {
var tmpInput = document.getElementsByName("textfield")[eOpts];
//获取指定的文本框
component.checked?tmpInput.disabled=false:tmpInput.disabled=true;
//判断文本框是否处于选中状态
}