随笔分类 -  前端

摘要:https://blog.csdn.net/wintersweetsugar/article/details/18258521 阅读全文
posted @ 2019-02-28 17:45 saman_-- 阅读(178) 评论(0) 推荐(0)
摘要:1 var validate = { 2 isMobile: function (value) { 3 var reg = /^1[3,4,5,7,8,9][0-9]{9}$/; 4 if (reg.test(value)) { 5 return true; 6 } 7 return f... 阅读全文
posted @ 2019-01-09 16:13 saman_-- 阅读(248) 评论(0) 推荐(0)
摘要:, error: function (jqXHR, textStatus, errorThrown) { /*弹出jqXHR对象的信息*/ alert(jqXHR.responseText); alert(jqXHR.status); a... 阅读全文
posted @ 2019-01-09 14:05 saman_-- 阅读(109) 评论(0) 推荐(0)
摘要:js金额校验,js正则表达式,包含正负,小数点后两位,js代码如下: function isMoney(s) { //金额 只允许正数 //var exp = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$) 阅读全文
posted @ 2019-01-09 12:13 saman_-- 阅读(2715) 评论(0) 推荐(0)
摘要:原文:https://blog.csdn.net/emsoc/article/details/79727095 阅读全文
posted @ 2019-01-09 12:12 saman_-- 阅读(2613) 评论(0) 推荐(0)
摘要:<input type="text" maxlength="10" /> 效果ok,当 <input type="number" maxlength="10" />时maxlength失效,长度可以无限输入。 解放方案: <input type="number" oninput="if(value. 阅读全文
posted @ 2019-01-09 12:10 saman_-- 阅读(157) 评论(0) 推荐(0)