// 验证正实数,负实数, var reg = / ^\-?([1-9]\d*|0)(\.\d+)?$ / ; 转载于:https://www.cnblogs.com/ForFreeDom/archive/2009/12/06/1617913.html