我对 ExtJs 很陌生,我想在单击其中一个单选按钮时显示一个警告框,但它似乎不起作用。谁能指导我完成这一步?侦听器似乎不起作用。
{
xtype: 'radiogroup',
fieldLabel: 'Does Nodes have DHCP IP Scheme?',
id:'dhcpRadio',
columns: [50, 50],
// Arrange radio buttons into two columns, distributed vertically
columns: 2,
vertical: true,
items: [{
boxLabel: 'Yes',
name: 'rb',
inputValue: 'yes',
listeners: {
check: function(rb,value){
if(value=='yes')
alert('yes');
else alert('no');
}
}
},{
boxLabel: 'No',
name: 'rb',
inputValue: 'no',
checked: true
}]
}