7
可能重複:
JavaScript function parseInt() doesn't parse numbers with leading 0 correctly爲什麼parseInt函數( 「08」)= 0,parseInt函數( 「07」)= 7
在JS解析的時候奇怪的問題出現。
parseInt("08")
//The result is: 0
parseInt("07")
//The result is: 7
這是怎麼發生的?
我沒有帶了這個問題! – Amir
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseInt – BalusC