我正在使用radiogroup是和否我希望將點擊值發送到服務器。如何實現它?extjs:從單選按鈕獲取檢查值
我的代碼:
{
fieldLabel: 'Striping',
xtype: 'radiogroup',
columns: [50, 100],
items: [{
boxLabel: 'Yes',
name: 'rb',
id: 'stYes',
/*checked: true,*/
inputValue: '1',
listeners: {
click: function() {
alert("Click 2!");
}
}
}, {
boxLabel: 'No',
name: 'rb',
id: 'stNo',
inputValue: '2',
listeners: {
click: function() {
alert("Click 2!");
}
}
}]
}
警戒也沒有來臨 – Hemant
在收音機上沒有'click'事件,請嘗試'check'事件。 http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.Radio-event-check – MMT
在radiogroup上使用'defaults:{name:'rb'}'自動組內的所有無線電都像一個組一樣工作。 – A1rPun