您的位置:首页 > 产品设计 > UI/UE

easyui源码翻译1.32--NumberBox(数值输入框)

2014-01-01 18:27 591 查看

前言

扩展自$.fn.validatebox.defaults。使用$.fn.numberbox.defaults重写默认值对象。下载该插件翻译源码

数值输入框是用来限制用户只能输入数值型数据的。他可以转换一个输入的元素到其他类型,比如:数字、百分比、货币等。更多的输入类型定义依赖于'formatter'和'parser'函数

源码

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Basic NumberBox - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="../../jquery-1.8.0.min.js"></script>
<script src="../../plugins2/jquery.parser.js"></script>
<script src="../../plugins2/jquery.validatebox.js"></script>
<script src="../../plugins2/jquery.numberbox.js"></script>
</head>
<body>
<h2>Basic NumberBox</h2>
<div class="demo-info">
<div class="demo-tip icon-tip"></div>
<div>The Box can only input number.</div>
</div>
<div style="margin:10px 0;"></div>
<input class="easyui-numberbox" required data-options="
onChange: function(value){
$('#vv').text(value);
}">
<div style="margin:10px 0;">
Value: <span id="vv"></span>
</div>
</body>
</html>


View Code

插件效果

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: