代码示例:(标识:eg_js_math_pow)
<!DOCTYPE html>
<html>
<body>

<h1>JavaScript Math.pow()</h1>

<p>Math.pow(x,y) 返回 x 的 y 次幂的值:</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = Math.pow(8,2);
</script>

</body>
</html>
运行结果: