摘要: const reg = /^([-+]?)([0-9]+)\.([0-9]*)$/; // 判断是不是浮点数 const isFloat = function(number){ return reg.test(number); } // 去除小数点转为整数 0.2 -> 2 1.3 -> 13 const floatToInt = function(matchArr){ l... 阅读全文
posted @ 2017-09-19 11:57 烂拖鞋 阅读(326) 评论(0) 推荐(0) 编辑