js中的Number方法

实例方法

  1. tostring()

    将数字转化为字符串

  2. toFixed()

    将数字转化为制定位数的小数,返回这小数的字符串。有效范围为0-20

  3. toExponential()

    转为为科学计数法,

  4. toPrecision()

    转化为指定位置的有效数字

posted @ 2017-08-03 16:56  ding0304  阅读(139)  评论(0编辑  收藏  举报