读书人

extjs RadioGroup 的设值 跟取值

发布时间: 2012-10-07 17:28:51 作者: rapoo

extjs RadioGroup 的设值 和取值

Ext.override(Ext.form.RadioGroup, {    getValue : function() {        var v;        this.items.each(function(item) {            if (item.getValue()) {                v = item.getRawValue();                return false;}});return v;},setValue : function(v) {if (this.rendered) {this.items.each(function(item) {item.setValue(item.inputValue == v);});} else {for (var k in this.items) {this.items[k].checked = this.items[k].inputValue == v;}}}});

读书人网 >JavaScript

热点推荐