<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Math.abs()</h1>
<p>Math.abs(x) 返回 x 的绝对值:</p>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = Math.abs(-4.4);
</script>
</body>
</html>