Ext.form.RadioGroup取值

在form在定义RadioGroup

1 new Ext.form.RadioGroup({
2 name:'selectsex',
3 id:'selectsex',
4 fieldLabel:'select',
5 hideLabel:true,
6 columns:2,
7 vertical:false,
8 items:[{
9 boxLabel:'',inputValue:'1',name:'sex',checked:true
10 },{
11 boxLabel:'',inputValue:'0',name:'sex'
12 }]
13 })

获取RadioGroup的值

1 var sex=Ext.getCmp('selectsex');
2 sex.eachItem(function(item){
3 if(item.checked===true){
4 alert(item.inputValue);
5 }
6 });

posted @ 2011-03-19 14:50  hzucmj  阅读(2040)  评论(0编辑  收藏  举报