您的位置:首页 > Web前端 > JavaScript

Extjs 获取 radiogroup 选中项的值

2013-07-22 17:13 363 查看
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: '我的文档'

            }]

        }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: