JavaScript Reference/Javascript Methods/ceil

Материал из Web эксперт
Перейти к: навигация, поиск

"ceil()" Example

   <source lang="javascript">
   

<html> <body> <button onclick="alert(Math.ceil(1.1));">CEIL</button> </body> </html>


     </source>
   
  


"ceil()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |Math | +----------------+--------------------------------------------------------------+

     </source>
   
  


"ceil()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Rounds the number up to the nearest integer.

Syntax:

Math.ceil(param1)

Parameters:

   param1   Required; the number to convert.
   
     
     </source>