这是一个现有系统用Ext JS做出来的效果,我不会做啊,据说是用xtype为numberfield做出来的。请各位大虾帮帮忙。
解决方案 »
- 求一个可以在线编辑表格的js组件
- 如何用javascript实现基本验证
- 类似google广告的那种javscript 接口 是怎么实现的?
- 请达人指点:看到一些JS文本编辑器,直接复制HTML内容到上面,它就会把原来的格式也能自动加上,这是怎么实现的啊?试了半天也没成功,请高人指点一下,谢谢
- 正则表达式 包含字母数字特殊符号
- 请问, 如何通过javascript取鼠标的绝对位置?
- 怎样获取table中的某一列对象元素
- 如何在iframe中动态获得自己name???或id???
- 关于 JSONObject 在SpringMVC 的使用问题~
- 求教--网站-一个页面链接多个腾讯视频现同时播放特别乱+吵,可否设置轮播或点击再播?
- 这样的效果叫什么?
- 关于循环传值问题
text : '100'
}new Ext.Panel ({
appto : 'xxxx' ,
items : textname
})
xtype: 'spinnerfield',
fieldLabel: 'Test',
name: 'test',
minValue: 0,
maxValue: 100,
allowDecimals: true,
decimalPrecision: 1,
incrementValue: 0.4,
alternateIncrementValue: 2.1,
accelerate: true
}
但是你需要引用 SpinnerField.js 和 Spinner.js 还有 Spinner.css
labelWidth: 40, // label settings here cascade unless overridden
frame: true,
title: 'Simple Form',
bodyStyle: 'padding:5px 5px 0',
width: 210,
defaults: {width: 135},
defaultType: 'textfield', items: [
new Ext.ux.form.SpinnerField({
fieldLabel: 'Age',
name: 'age'
}),
{
xtype: 'spinnerfield',
fieldLabel: 'Test',
name: 'test',
minValue: 0,
maxValue: 100,
allowDecimals: true,
decimalPrecision: 1,
incrementValue: 0.4,
alternateIncrementValue: 2.1,
accelerate: true
}
]
});
xtype 是 'spinnerfield'
可以通过这么引用
{
xtype: 'spinnerfield',
fieldLabel: 'Test',
name: 'test',
minValue: 0,
maxValue: 100,
allowDecimals: true,
decimalPrecision: 1,
incrementValue: 0.4,
alternateIncrementValue: 2.1,
accelerate: true
}
引用的同时需要引入相关的js 和css
<link rel="stylesheet" type="text/css" href="../ux/css/Spinner.css" />
<script type="text/javascript" src="../ux/Spinner.js"></script>
<script type="text/javascript" src="../ux/SpinnerField.js"></script>