[ExtJs4.0]根据一个文本框输入的内容自动填写到另外一个文本框内
2012-08-16 13:24
351 查看
一个增加数,一个减少数,随便输入其中一个另外一个都会自动输入
{
xtype: 'textfield',
id: 'IncreaseId',
fieldLabel: '增?加¨®数ºy<span style="color: red;" >*</span>',
regex: /^[0-9]*$/,
regexText: '请?输º?入¨?整?数ºy',
width: 400,
name: 'IncreaseNumber',
allowBlank: false,
maxLength: 10,
maxLengthText: '输º?入¨?过y长¡è',
onBlur: function () {
var thisForm = this.up('form');
var increaseNumberValue = thisForm.getForm().findField('IncreaseId').getValue();
thisForm.getForm().findField('ReduceId').setValue(increaseNumberValue);
}
}
, {
xtype: 'textfield',
fieldLabel: '减?少¦¨´数ºy<span style="color: red;" >*</span>',
id: 'ReduceId',
regex: /^[0-9]*$/,
regexText: '请?输º?入¨?整?数ºy',
width: 400,
name: 'ReduceNumber',
allowBlank: false,
maxLength: 10,
maxLengthText: '输º?入¨?过y长¡è',
onBlur: function () {
var thisForm = this.up('form');
var reduceNumberValue = thisForm.getForm().findField('ReduceId').getValue();
thisForm.getForm().findField('IncreaseId').setValue(reduceNumberValue);
}
},
{
xtype: 'textfield',
id: 'IncreaseId',
fieldLabel: '增?加¨®数ºy<span style="color: red;" >*</span>',
regex: /^[0-9]*$/,
regexText: '请?输º?入¨?整?数ºy',
width: 400,
name: 'IncreaseNumber',
allowBlank: false,
maxLength: 10,
maxLengthText: '输º?入¨?过y长¡è',
onBlur: function () {
var thisForm = this.up('form');
var increaseNumberValue = thisForm.getForm().findField('IncreaseId').getValue();
thisForm.getForm().findField('ReduceId').setValue(increaseNumberValue);
}
}
, {
xtype: 'textfield',
fieldLabel: '减?少¦¨´数ºy<span style="color: red;" >*</span>',
id: 'ReduceId',
regex: /^[0-9]*$/,
regexText: '请?输º?入¨?整?数ºy',
width: 400,
name: 'ReduceNumber',
allowBlank: false,
maxLength: 10,
maxLengthText: '输º?入¨?过y长¡è',
onBlur: function () {
var thisForm = this.up('form');
var reduceNumberValue = thisForm.getForm().findField('ReduceId').getValue();
thisForm.getForm().findField('IncreaseId').setValue(reduceNumberValue);
}
},
相关文章推荐
- textarea自动换行,且文本框根据输入内容自适应高度
- Jquery实现 TextArea 文本框根据输入内容自动适应高度
- 窗体上有两个文本框:一个文本框中最多输入字符6个;一个文本框中输入任何内容都显示*号。再添加一个按钮、2个单选按钮。实现单击按钮后,根据单选按钮,将对应文本框中内容显示在标签
- Jquery实现 TextArea 文本框根据输入内容自动适应高度
- JAVA文本框根据输入内容自动模糊查询(动态)
- 使用jQuery动态创建一个表格(根据用户输入的内容添加一行数据,并且能逐行删除)
- 用js实现的一个根据内容自动生成表格的函数
- AJAX基本应用之:根据输入内容自动填充下拉框
- [转]给你一个单词a,如果通过交换单词中字母的顺序可以得到另外的单词b,那么定义b是a的兄弟单词。现在给你一个字典,用户输入一个单词,让你根据字典找出这个单词有多少个兄弟单词
- IE8浏览器访问百度首页,输入关键字,点击“百度一下”,搜索内容出现在一个自动打开的新窗口的问题的一个原因
- Input文本框随着输入内容多少自动延伸的实现
- Tag It 一款 Jquery控件,当你在文本框中输入逗号时,自动帮你分隔开相关内容
- 用Javascript制作一个可自动填写的文本框(二)
- 用ContentObserver内容观察者写了一个自动填写验证码
- javascript 一个文本框输入完毕后自动跳转到下一个文本框的方法
- 输入内容自动完成文本框(AutoCompleteTextView )
- JS实现在文本框输入时自动弹出相关内容提示
- Input文本框随着输入内容多少自动延伸
- 输入内容自动完成文本框(AutoCompleteTextView )
- Input文本框随着输入内容多少自动延伸