1 代码示例
<!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
function fnSum(num1, num2){
var ret = num1 + num2;
return ret;
}
var ret = fnSum(23,3)
alert(ret);
</script>
</head>
<body>
</body>
</html>