js正则表达式校验0到120之间的数字var reg = ^(0|([1-9]d?)|(1[01]d)|(120))(.d*)?$var str = "121.1111"console.log(reg.test(str))(-?180)|(-?12023-04-30JavaScript1040