Extjs 获取 radiogroup 选中项的值 网上流传重定义radiogroup 的getValue 其实没这么复杂 如下可耶:
{
xtype: 'radiogroup',
fieldLabel: '显示',
id: 'rgx',
labelWidth: 30,
width: 200,
listeners: {
change: function () {
alert(Ext.getCmp('rgx').lastValue.isshare); //这一行可以显示选中的值 0 或 1 关键是 .lastValue
}
},
items: [{
name: 'isshare',
inputValue: '1',
boxLabel: '共享文档',
checked: true
}, {
name: 'isshare',
inputValue: '0',
boxLabel: '我的文档'
}]
}
本文介绍如何在ExtJS中通过简单的代码实现获取Radiogroup组件选中项的功能,包括关键代码解析及应用示例。
1778

被折叠的 条评论
为什么被折叠?



