当前位置: 代码迷 >> Web前端 >> toExponential 对象的值变换为指数计数法
  详细解决方案

toExponential 对象的值变换为指数计数法

热度:147   发布时间:2013-08-09 15:16:24.0
toExponential 对象的值转换为指数计数法
语法:NumberObject.toExponential(num)

num,指定指数计数法的小数的位数,如 89,指定小数位1,则
val number="89";
alert(number.toExponential(1));
就会输出8.9e+1
后面+1,代表的是科学计数法的表示法