extjs的combobox的change事件

来源:互联网 发布:java人才招聘网站源码 编辑:程序博客网 时间:2024/05/21 07:02

如果不是‘额’,点击其他combo填入的值都和最后一次触发的相同。‘select’也可以实现(function 中传入的参数不同,combo, records, eOpts),可以获得combo,再获得值

Ext.getCmp('combobox的id')。然后getValue();


items : [{xtype : 'combobox',id : 'one',name : 'one' ,margin : '12px 4px 4px 4px',fieldLabel : '一',store : ['1', '2', '3',  '非'],listeners : {                 change : {                fn : me.changeValue,                scope : me                }                 }}, {xtype : 'combobox',id : 'two',name : 'two' ,margin : '12px 4px 4px 4px',fieldLabel : ' 二',store : ['1', '2', '3',  '额 '],listeners : {                 change : {                fn : me.changeValue,                scope : me                }                 }}, {xtype : 'combobox',id : 'three',name : 'three',margin : '12px 4px 4px 4px',fieldLabel : ' 三',store : ['1', '2', '3', '额 '],listeners : {                 change : {                fn : me.changeValue,                scope : me                }                 }}}]  changeValue : function(obj, newValue, oldValue, eOpts  ) {if (newValue != '额') {var Mond = Ext.getCmp('one');if (Mond.getValue() != '额') { Mond.setValue(newValue);}var Tuesd = Ext.getCmp('two');if (Tuesd.getValue() != '额') {Tuesd.setValue(newValue);}var Wednesd = Ext.getCmp('three');if (Wednesd.getValue() != '额') {Wednesd.setValue(newValue);}}}




0 0
原创粉丝点击