最近评论
正在载入评论列表...
![]() |
![]() |
球体面积的计算公式为:4×圆周率×圆半径2
在JavaScript中表示为:
area = 4 * Math.PI * Math.pow(radius, 2);

<html>
<head>
<title>球体面积计算</title>
</head>
<body>
<script language="javascript">
|
radius = prompt("请输入球体的半径:");
|
document.write("球体的面积为:" + area);
//-->
</script>
</body>
</html>

图1.37