欢迎您访问我爱IT技术网,今天小编为你分享的javascript教程:【Extjs 4.x 得到form CheckBox 复选框的值】,下面是详细的讲解!
Extjs 4.x 得到form CheckBox 复选框的值
var fp=Ext.create('Ext.FormPanel', {
frame: true,
fieldDefaults: {
labelWidth: 110
},
width: 500,
bodyPadding: 10,
items: [
{
xtype: 'fieldset',
flex: 1,
//title: '确定要拒绝该张表吗?',
defaultType: 'checkbox',
layout: 'anchor',
defaults: {
anchor: '100%',
hideEmptyLabel: false
},
items:[{
fieldLabel: '请选择拒绝原因:',
boxLabel: '该表没有填写完整。',
name:'integrity',
inputValue: '1'
}, {
name:'correct',
boxLabel: '该表填写不准确。',
inputValue: '1'
}]
}],
buttons: [
{text: '确认',handler: function(){
//得到完整性和准确性信息 有则为1 没有为0
if(fp.getForm().isValid()){
console.log(fp.getForm().findField('integrity').getValue()?1:0);
console.log(fp.getForm().findField('correct').getValue()?1:0)
}
win.hide();
}
},{
text: '取消',
handler: function(){
win.hide();
}
}]
});
关于Extjs 4.x 得到form CheckBox 复选框的值的用户互动如下:
相关问题:JS如何获取表单中复选框的值?
答:这样不行的,而且要获得复选框也应该这么写: document.form['chk[]'].value然后再循环判断checked属性,取值。 >>详细
相关问题:extjs 2.0 formPanel如何获取复选框选择的值
答:你给你要去的对象/控件 给个ID。 比如 id : 'name' var nameCmp = Ext.getCmp('name'); 满意请采纳。 >>详细
相关问题:form表单提交了多个checkbox怎么获取复选框的值存...
答:redim Preserve check(i)//i=0 for i = 0 to check.length - 1//check.length =0 >>详细
- 【firefox】firefox浏览器不支持innerText的解决
- 【Extjs】Extjs学习过程中新手容易碰到的低级错误
- 【clearInterval】js clearInterval()方法的定义
- 【dom】javascript dom追加内容实现示例-追加内容
- 【checkbox】让checkbox不选中即将选中的checkbox
- 【Array】js中更短的 Array 类型转换-类型转换
- 【append】append和appendTo的区别以及appendChil
- 【ExtJs】ExtJs 表单提交登陆实现代码-表单提交-
- 【ajax清除浏览器缓存】Ajax清除浏览器js、css、
- 【AJAX】AJAX异步从优酷专辑中采集所有视频及信息
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
