1、定义匹配规则
var rep=/[\.]/;
2、定义需要验证的数据。
var data=1.5;
3、进行判断,返回值为true或false
rep.test(discountvalue);
1、定义匹配规则
var rep=/[\.]/;
2、定义需要验证的数据。
var data=1.5;
3、进行判断,返回值为true或false
rep.test(discountvalue);
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。