1、在定义组件的配置时设置 {
xtype : 'textarea',
name : 'mytext',
labelSeparator:'',
fieldLabel:'',
hideLabel: true,
allowBlank: true,
height: mainPanelHeight*0.8,
anchor:'99%',
listeners:{'blur':function(){
alert(1);
}} 2、对组件变量通过on方法设置
Ext.getCmp('mytext').on('rowdblclick',function(gridPanel,_rowIndex,e){
alert(2);
}
3、通过组件变量方法addListener()设置
Ext.getCmp('mytext').addListener('rowclick',function(){
alert(3)}
); Ext 添加监听 方法Ext 方法监听
xtype : 'textarea',
name : 'mytext',
labelSeparator:'',
fieldLabel:'',
hideLabel: true,
allowBlank: true,
height: mainPanelHeight*0.8,
anchor:'99%',
listeners:{'blur':function(){
alert(1);
}} 2、对组件变量通过on方法设置
Ext.getCmp('mytext').on('rowdblclick',function(gridPanel,_rowIndex,e){
alert(2);
}
3、通过组件变量方法addListener()设置
Ext.getCmp('mytext').addListener('rowclick',function(){
alert(3)}
); Ext 添加监听 方法Ext 方法监听
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货