日期:2014-05-16 浏览次数:20389 次
var str = "123.02"; var match = str.match(/^\d+(\.\d{1,2})?$/)[0]; alert(match);