正则表达式验证数字和小数

验证纯数字:onkeyup="this.value=this.value.replace(/D/g,'')"

验证带小说点的数字: onkeyup="this.value=this.value.replace(/[^d.]/g,'')" maxlength="6"

提供房源信息网站 http://www.iefang.com
原文地址:https://www.cnblogs.com/zhaoyanqun/p/4063054.html