验证最多2位小数,1到10 不超过10 带两位小数的正则表达式 /^(([1-9](.d{2})?)|10|10.0)$/.test() 验证最多2位小数 /^(([1-9]{1}d*)|(0{1}))(.d{1,2})?$/.test(str)