[JavaScript-數學類]數學四捨五入函數的-使用Math.round()
說明:
四捨五入
程式:
<script type="text/javascript">
document.write("3.14 四捨五入為:"+Math.round(3.14)+"<br>");
document.write("3.57 四捨五入為:"+Math.round(3.57)+"<br>");
</script>
結果:
圖:
其它文章
留言列表