JavaScript Reference/Javascript Methods/abs — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:22, 26 мая 2010
"abs()" Example
<source lang="javascript">
<html> <body> <button onclick="alert(Math.abs(-10));">ABS</button> </body> </html>
</source>
"abs()" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |Math | +----------------+--------------------------------------------------------------+
</source>
"abs()" Syntax, Parameters and Note
<source lang="javascript">
Note: Returns the absolute value.
Syntax:
Math.abs(param1)
Parameters:
param1 Required; the number to convert. </source>