parseInt 默认转换为8进制数= =、带参数吧...
参考:
http://www.cnblogs.com/carekee/articles/1729574.html
parseInt("1234blue"); //returns 1234 parseInt("0xA"); //returns 10 parseInt("22.5"); //returns 22 parseInt("blue"); //returns NaN parseInt("AF", 16); //returns 175 parseInt("10", 2); //returns 2 parseInt("10", 8); //returns 8 parseInt("10", 10); //returns 10 parseInt("010"); //returns 8 parseInt("010", 8); //returns 8 parseInt("010", 10); //returns 10 parseFloat("1234blue"); //returns 1234.0 parseFloat("0xA"); //returns NaN parseFloat("22.5"); //returns 22.5 parseFloat("22.34.5"); //returns 22.34 parseFloat("0908"); //returns 908 parseFloat("blue"); //returns NaN