字符串数字转数字 var str = '100'; var num = +str; 非字符串数字转NaNvar str = 'a100'; var num = +str;//NaN 转载于:https://www.cnblogs.com/SuLingLiu/p/7730084.html