js
qq_15618849
这个作者很懒,什么都没留下…
展开
-
js验证手机号码格式
if (!(/^1[3|4|5|7|8][0-9]\d{8}$/.test(phone)) && !(/^0(([1,2]\d)|([3-9]\d{2}))-?\d{7,8}$/.test(phone))) { return false; }转载 2015-04-11 09:29:23 · 833 阅读 · 0 评论 -
jQuery ajax提交
$.ajax({ type: "POST", url: "/index.php", data: { act: submit, ref: document.URL }, dataType: "json", beforeSend: functi转载 2015-04-11 09:50:03 · 276 阅读 · 0 评论 -
js验证2-20位中文字符
var checkChar = function(value) {return /^[\u4e00-\u9fa5]{2,20}$/.test(value);};转载 2015-04-11 09:37:42 · 964 阅读 · 0 评论 -
js 格式化数字和格式化金额
//格式化数字500000 --> 500,000function formatNumber(a,b){if(b=$.extend({},{decimalSeparator:".",thousandsSeparator:",",decimalPlaces:0,round:!1,prefix:"",suffix:"",defaulValue:0},b),"number"==typeof a&&i转载 2015-04-09 13:56:39 · 425 阅读 · 0 评论