<html><head><title>JavaScript Math round()方法</title></head><body><scripttype="text/javascript">var value =Math.round(0.5);
document.write("第一个测试值 : "+ value );var value =Math.round(20.7);
document.write("<br/>第二个测试值 : "+ value );var value =Math.round(20.3);
document.write("<br/>第三个测试值 : "+ value );var value =Math.round(-20.3);
document.write("<br/>第四个测试值 : "+ value );</script></body></html>