另一種常見字串轉數值的方式,則是使用parseInt 或parseFloat 函式來解析字串。 這裡你必須特別注意這兩個函式的 ... parseFloat(str) ... toFixed(3).
確定! 回上一頁