Ext獲取單選框的值
阿新 • • 發佈:2021-01-09
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