有参函数


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>有参函数</title>
</head>

<body>
</body>

</html>
<script>
function people(name, age) {
alert('姓名:' + name + ',年龄:' + age)
}
people('小明', '25')
</script>