1、定义匹配规则 var rep=/[\.]/; 2、定义需要验证的数据。 var data=1.5; 3、进行判断,返回值为true或false rep.test(discountvalue); 相关文章: