<script language="JavaScript"> document.write( Math.ceil(0.35) + "<br />" ); document.write( Math.ceil(10) + "<br />" ); document.write( Math.ceil(-10) + "<br />" ); document.write( Math.ceil(-10.1) ); </script>
运行该例子,输出:
1 10 -10 -10
0