1. 程式人生 > 其它 >Ext獲取單選框的值

Ext獲取單選框的值

技術標籤:EXTradio

Ext獲取單選框的值

內嵌式form獲取radio的值

   items: [
          	{
				xtype:"form",
				id:"formPanel",
				frame: true,
				renderTo: Ext.getBody(),
				items: [
                    {xtype:"radio", name:"formState", fieldLabel:"狀態類別", boxLabel:
"紅色", inputValue : '400', }, {xtype: "radio", name: "formState", fieldLabel: "", boxLabel: "橙色",inputValue : '401'}, {xtype: "radio", name: "formState", fieldLabel: "", boxLabel: "紫色"
,inputValue : '402'}, {xtype: "radio", name: "formState", fieldLabel: "", boxLabel: "黃色",inputValue : '403'} ] } ] var Value = Ext.getCmp("formPanel").
getForm().findField("formState").getGroupValue(); Value的值就是radio的inputValue