首页 > 其他 > 详细

easy-ui表单字段(单字段---》验证---》整数、小数 、%(同时需要))

时间:2018-08-21 14:17:58      阅读:211      评论:0      收藏:0      [点我收藏+]

// 单字段---》验证---》整数、小数  、%(同时需要)

<script>

//保底值
$.extend($.fn.validatebox.defaults.rules, {     //此句为自定义重写校验
bottom_value: {
validator: function (value) {
return /^\d+(\.\d+)?$/i.test(value);
},
message: ‘请输入(整数,小数,百分率),并确保格式正确‘
},
});

</script>

<body>

  <form id=“123” class ="form">

   <table>

    

<tr>
    <td class="right">
    <label for="bottom_value">保底值:</label>
</td>
<td class="left">
         <input type="text" id="bottom_value" name="bottom_value" style="width:200px;height:28px"
         class="easyui-validatebox" data-options="required:false,validType:‘bottom_value‘" />
</td>
</tr>

  </table>

</from>

</body>

easy-ui表单字段(单字段---》验证---》整数、小数 、%(同时需要))

原文:https://www.cnblogs.com/Darkqueen/p/9510931.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!