问答详情
源自:7-13 向上取整ceil()

还有没有更简单的

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Math </title>

<script type="text/javascript">

var a=["0.8","6.3","5"]

for(i=0;i<a.length;i++){

    document.write(Math.ceil(a[i]))

}

</script>

</head>

<body>

</body>

</html>


提问者:精慕门8048175 2019-02-20 22:20

个回答

  • 玄心之玉
    2019-03-06 14:03:27

    没了,这个是最简的了