JavaScript Reference/Javascript Methods/abs
Версия от 18:30, 25 мая 2010; (обсуждение)
"abs()" Example
<html>
<body>
<button onclick="alert(Math.abs(-10));">ABS</button>
</body>
</html>
"abs()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |Math |
+----------------+--------------------------------------------------------------+
"abs()" Syntax, Parameters and Note
Note:
Returns the absolute value.
Syntax:
Math.abs(param1)
Parameters:
param1 Required; the number to convert.