日期:2014-05-16 浏览次数:20421 次
var price = 11.11; checkPrice(price ); function checkPrice(price){ return (/^(([1-9]\d*)|\d)(\.\d{1,2})?$/).test(price.toString()); }