JavaScript Tutorial/Math/floor

Материал из Web эксперт
Версия от 11:24, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Math.floor()

Syntax math.floor(num) Description Get the largest integer number, which is equivalent to or less than the number passed as the parameter.



   <source lang="javascript">

<html>

   <body>
   <script language="JavaScript">
   
   </script>
   <form name=form1>
   This example calculates the floor of the number entered.
   

Enter First Number: <input type="text" name="input" size=10> <input type="button" value="Calculate" onClick="doMath()">
The floor is: <input type="text" name="answer" size=10> </form> </body> </html></source>