Number.toExponential
指定された桁数で指数形式に変換します。123.456にtoExponential(2)を適用すると結果は1.23e+2となります。Macintosh版Internet Explorer 5では動作しません。Windows版Internet Explorerはバージョン5.5以降で利用することができます。
構文
数値.toExponential(指数位置)
例文
<html> <head> <title>Number.toExponential</title> </head> <body> <script type="text/javascript"><!-- n = 123.456; val = n.toExponential(2); document.write(val); // --></script> </body> </html>
関連記事
- Number.toPrecision
- Number.toFixed
- Number.prototype
- Number.NaN
- isNaN
- Number.toString
- Number.POSITIVE_INFINITY
- Number.NEGATIVE_INFINITY
- Number.MIN_VALUE
- Number.MAX_VALUE
スポンサーリンク