案例:JavaScript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function product(a,b)
5
{
6
return a*b
7
}
8
</script>
9
</head>
10
11
<body>
12
<script type="text/javascript">
13
document.write(product(6,5))
14
</script>
15
16
<p>body 部分中的脚本调用一个带有两个参数(6 和 5)的函数。</p>
17
<p>该函数会返回这两个参数的乘积。</p>
18
19
</body>
20
</html>
21