码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2018-08-21 15:20:54      阅读:287      评论:0      收藏:0      [点我收藏+]

标签:table   ret   data-   rip   height   script   extend   class   turn   

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

<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表单字段(单字段---》验证---》整数、小数 、%(同时需要))

标签:table   ret   data-   rip   height   script   extend   class   turn   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!