JavaScript Math ceil 方法


JavaScript Math ceil 方法

<html>

   <head>
      <title>JavaScript Math ceil() Method</title>
   </head>

   <body>

      <script type = "text/javascript">
         var value = Math.ceil(45.95);
         document.write("First Test Value : " + value );

         var value = Math.ceil(45.20);
         document.write("<br />Second Test Value : " + value );

         var value = Math.ceil(-45.95);
         document.write("<br />Third Test Value : " + value );

         var value = Math.ceil(-45.20);
         document.write("<br />Fourth Test Value : " + value );
      </script>

   </body>
</html>