ext radio 获取值
2016-07-13 18:54
211 查看
var completePanel = new Ext.FormPanel({
layout:"table",
height:390,
defaults:{
labelAlign: 'right',
layout:"form",
border:false,
labelWidth:30,
bodyStyle:"padding:1px"
},
layoutConfig:{
columns:6
},
items:[{
labelWidth:60,
items:[{
xtype:"label",
fieldLabel:"处理结果"
}]
},{
labelWidth:1,
items:[{
xtype:"radio",
checked:true,
inputValue:"1",
name:"result"
}]
},{
items:[{
xtype:"label",
fieldLabel:"成功",
labelSeparator:""
}]
},{
items:[{
xtype:"radio",
inputValue:"-1",
name:"result"
}]
},{
items:[{
xtype:"label",
fieldLabel:"失败",
labelSeparator:""//去掉label后面冒号
}]
},{width:100},{
colspan:6,
labelWidth:60,
items:[{
xtype:"textarea",
fieldLabel:"处理意见",
width:300
}]
}]
})
必须要定义成Ext.FormPanel 否者通过其他方式的获取不到
在items中定义value值也是无效的必须是inputValue 特别说明一下 inputValue的值不可以为0 否者会出现无法点击的现象
获取方式:var value = completePanel.getForm().findField("result").getGroupValue();
ok问题解决
layout:"table",
height:390,
defaults:{
labelAlign: 'right',
layout:"form",
border:false,
labelWidth:30,
bodyStyle:"padding:1px"
},
layoutConfig:{
columns:6
},
items:[{
labelWidth:60,
items:[{
xtype:"label",
fieldLabel:"处理结果"
}]
},{
labelWidth:1,
items:[{
xtype:"radio",
checked:true,
inputValue:"1",
name:"result"
}]
},{
items:[{
xtype:"label",
fieldLabel:"成功",
labelSeparator:""
}]
},{
items:[{
xtype:"radio",
inputValue:"-1",
name:"result"
}]
},{
items:[{
xtype:"label",
fieldLabel:"失败",
labelSeparator:""//去掉label后面冒号
}]
},{width:100},{
colspan:6,
labelWidth:60,
items:[{
xtype:"textarea",
fieldLabel:"处理意见",
width:300
}]
}]
})
必须要定义成Ext.FormPanel 否者通过其他方式的获取不到
在items中定义value值也是无效的必须是inputValue 特别说明一下 inputValue的值不可以为0 否者会出现无法点击的现象
获取方式:var value = completePanel.getForm().findField("result").getGroupValue();
ok问题解决
相关文章推荐
- ext监听事件方法[初级篇]
- ext读取两种结构的xml的代码
- EXT富客户端后台管理系统 初步代码第1/2页
- ext实现完整的登录代码
- Ext第一周 史上最强学习笔记---GridPanel(基础篇)
- ext 列表页面关于多行查询的办法
- 用tip解决Ext列宽度不够的问题
- Ext 今日学习总结
- Ext JS框架程序中阻止键盘触发回退或者刷新页面的代码分享
- JavaScript的Ext JS框架中的GridPanel组件使用指南
- Ext JS框架中日期函数的用法及日期选择控件的实现
- Ext JS动态加载JavaScript创建窗体的方法
- Ext对基本类型的扩展 ext,extjs,format
- ExtJS 2.0实用简明教程 之Ext类库简介
- sencha ext js 6 快速入门(必看)
- ext jquery 简单比较
- flexigrid 类似ext grid的JS表格代码
- EXT中xtype的含义分析
- ext for eclipse插件安装方法
- 使Ext的Template可以解析二层的json数据的方法