<!DOCTYPE html> <html> <body> <h1>JavaScript Math.PI</h1> <p>Math.PI 返回圆周长与直径的比率:</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = Math.PI; </script> </body> </html>