在以下代碼段,如何可以顯示消息的toString浮點數以JavaScript
Min value is 0.00000001.
而非
Min value is 1e-8
var minValue = 0.00000001;
var message = "Min value is " + minValue.toString();
var content = $('p#content').text(message);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<p id="content"></p>
爲什麼是U做的toString()? –
它實際上是打字稿,數據類型是數字 –
是不是隻是打印? – Mox