<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script>
alert(Math.ceil(3.01));//->4,向上取整;
alert(Math.floor(3.999));//->3,向下取整;
</script>
</body>
</html>