作者热门文章
- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我在带有 3 个单选按钮的 extjs 面板中有一个单选组组件。但是我可以一次选择多个 rediobuttons,而 radiogroups 应该只允许选择一个。它应该是默认行为。
我在 radiogroup 组件中找不到任何配置属性来禁止多选。
有什么方法可以在 extJs 的单选组中禁用多选。
最佳答案
配置在radio下面。单选组下的每个单选按钮都应具有相同的名称。看看下面的代码。
xtype: 'radiogroup'
,fieldLabel: 'Sample radiogroup'
,items: [
{boxLabel: 'Item 1', name: 'same-name', inputValue: 1}
,{boxLabel: 'Item 2', name: 'same-name', inputValue: 2, checked: true}
,{boxLabel: 'Item 3', name: 'same-name', inputValue: 3}
,{boxLabel: 'Item 4', name: 'same-name', inputValue: 4}
,{boxLabel: 'Item 5', name: 'same-name', inputValue: 5}
]
关于javascript - 如何在单选组 extjs 中禁用多选,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12068402/
我是一名优秀的程序员,十分优秀!