摘要: http://www.internetke.com/m3_itm_mode1_139.html 1. 转换函数: js提供了parseInt()和parseFloat()两个转换函数。前者把值转换成整数,后者把值转换成浮点数。只有对String类型调用这些方法,这两个函数才能正确运行;对其他类型返回 阅读全文
posted @ 2020-12-02 10:43 liness0713 阅读(5283) 评论(0) 推荐(1) 编辑
摘要: https://www.runoob.com/w3cnote/js-round-to-at-most-2-decimal.html JS 四舍五入 分类 编程技术 四舍五入可以使用 toFixed() 方法,toFixed() 方法可把 Number 四舍五入为指定小数位数的数字。 代码如下: to 阅读全文
posted @ 2020-12-02 10:41 liness0713 阅读(125) 评论(0) 推荐(0) 编辑