js默认比较第一个数字大小

解决办法:先把数字用Number转化:num=Number(num);然后再比较

和parseInt区别

原文地址:https://www.cnblogs.com/xlz307/p/3457358.html