ASP sub过程调用

来源:百度知道 编辑:UC知道 时间:2024/05/24 03:17:06
<script language="vbs">
sub m(d,b,c)
m=(d+b+c)\3
if m>=80 then
document.write "一等奖学金"
elseif m>=75 then
document.write "二等奖学金"
elseif m>=70 then
document.write "三等奖学金"
else
document.write "没有奖学金"
end if
end sub

d=23
b=79
c=75 这三个数(可以更改的)是放在定义过程里面麽?
document.write m(d,b,c) 这样不对,怎么调用呢?
</script>

VBS里不用document

d=23
b=79
c=75 这三个数(可以更改的)是放在定义过程里面麽?
call m(d,b,c) 这样不对,怎么调用呢?

response.Write "一等奖学金"

<% '我替你改成了ASP调用
function m(d,b,c)
m=(d+b+c)/3
if m>=80 then
m="一等奖学金"
elseif m>=75 then
m="二等奖学金"
elseif m>=70 then
m="三等奖学金"
else
m="没有奖学金"
end if
end function

d=23
b=79
c=75
response.write m(d,b,c)%>

直接调用 call m(d,b,c)应该就能输出了

没需要 document.write