JavaScript Tutorial/Math/floor — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:24, 26 мая 2010
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>