调试运行
<html> <head> <title>四舍五入函数的使用</title> </head> <body> <script language="javascript"> <!-- document.write("3.14四舍五入为:",Math.round(3.14),"<br>"); document.write("1.5四舍五入为:",Math.round(1.5),"<br>"); //--> </script> </body> </html>