判段整数和小数的正则表达式

1.判段整数和小数 的 正则表达式

function isNumber(value) 
{
     var rex = /^\d{1,14}(\.\d{1,2})?$/;
     if (rex.test(value)) {
       return true;
     } else {
        return false;
     }  
}

猜你喜欢

转载自blog.csdn.net/qq_38366657/article/details/81698664