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

<p>单击该按钮可显示 Math.exp() 在不同数字上的结果。</p>

<button onclick="myFunction()">试一试</button>

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

<script>
function myFunction() {
  var a = Math.exp(1);
  var b = Math.exp(-1);
  var c = Math.exp(5);
  var d = Math.exp(10);

  var x = a + "<br>" + b + "<br>" + c + "<br>" + d;
  document.getElementById("demo").innerHTML = x; 
}
</script>

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