function my_function(参数列表)
函数体
函数名 = 函数的返回值 end function
示例代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<[email=%@LANGUAGE=]%@LANGUAGE="VBSCRIPT[/email]" CODEPAGE="65001" %>
<%
function add_ab(a, b)
dim c
c = a + b
add_ab = c
end function
response.Write("2 + 5 = " & add_ab(2, 5))
%>
</body>
</html>