<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Math.random()</h1>
<p>Math.random() 返回 0 与 1 之间的随机值:</p>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = Math.random();
</script>
</body>
</html>