巧妙运用NumberField:
只允许字段输入数字.
var schedule=new Ext.form.NumberField({
fieldLabel: 'Schedule',
name: 'schedule',
decimalPrecision :0,
allowBlank:false,
width:60
});
只允许字段100以内的数字.
var schedule=new Ext.form.NumberField({
fieldLabel: 'Schedule',
name: 'schedule',
minValue: 1,
maxValue:100,
decimalPrecision :0,
// emptyText: '__%',
allowBlank:false,
width:60
});
1-100的数字.自动小数点后两位补齐.(属性在numberfield 中默认是这样)
var schedule=new Ext.form.NumberField({
fieldLabel: 'Schedule',
name: 'schedule',
minValue: 1,
maxValue:100,
allowBlank:false,
width:60
});
巧妙运用NumberField
最新推荐文章于 2021-11-02 16:07:23 发布