调试运行
<html> <head> <title>球体面积计算</title> </head> <body> <script language="javascript"> <!-- radius = prompt("请输入球体的半径:"); area = 4 * Math.PI * Math.pow(radius, 2); document.write("球体的面积为:" + area); //--> </script> </body> </html>