最近评论
正在载入评论列表...
![]() |
![]() |
Math.round(3.14)
其中3.14为要进行四舍五入的数。
<html>
<head>
<title>四舍五入函数的使用</title>
</head>
<body>
<script language="javascript">
<!--
document.write("3.14四舍五入为:",Math.round(3.14),"<br>");
document.write("1.5四舍五入为:",Math.round(2.5),"<br>");
//-->
</script>
</body>
</html>

图1.29