Math()函数: x的y次方:Math.pow(x,y) 取小数点后两位:num.toFixed(2) 数据类型转换: 字符串转换为数字:parseInt(num)转换为整数;parseFloat(num)转换为浮点数; 相关文章: 2021-10-16 2021-10-16 2022-01-12