我使用extjs 4作爲單選按鈕。代碼如下如何使用extjs 4獲取radiogroup檢查值?
var mychkbxgrp = Ext.create('Ext.form.RadioGroup',{
fieldLabel: 'Layer',
columns: 1,
items:[{
boxLabel: 'District', name: 'rb', inputValue: 'district',itemId:"DIS"
},{
boxLabel: 'SubDistrict', name: 'rb', inputValue: 'Subdistrict',itemId:"sub"
},{
boxLabel: 'Village', name: 'rb', inputValue: 'Village'
},{
boxLabel: 'Road', name: 'rb', inputValue: 'Roads'
},{
boxLabel: 'Point', name: 'rb', inputValue: 'POINT'
}],
listeners: {
change : function(){
alert(this.getValue());
}
}
});
我想獲取檢查後的單選按鈕的值。爲此,我使用了聽衆但不工作。我是對的還是需要用其他方式。請幫助我一樣。
在你的代碼,如果你只需要改變'警報(this.getValue())''要警惕(this.getValue ().rb)',你就完成了。 –
謝謝。有效。 – Pari