<!DOCTYPE html>
<html lang=
"en">
<head>
<meta charset=
"UTF-8">
<meta name=
"viewport" content=
"width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
function sum(a,b,c){
//
alert(a+b+c
);
var d=
(a+b+c
);
return d
;
}
//调用函数
//变量result的值就是函数的执行结果
//函数返回什么result的值就是什么
var result=
sum(1,2,3
);
document.
write("result="+result
);
</script>
</head>
<body>
</body>
</html>