`

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;
						}
					}
				}});

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics