big_briuses
2015-03-29 17:07
<script type="text/javascript"> var a=["3.3","-0.1","-9.9","8.9"]; for(var i=0;i<a.length;i++) { document.write(Math.round(a[i])); }
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
var a=[3.3,-0.1,-9.9,8.9];
for(i in a){
document.write(Math.round(a[i])+'<br/>');
}
</script>
</head>
<body>
</body>
</html>
diaodiaode
JavaScript进阶篇
468060 学习 · 21891 问题
相似问题