ASP 错误问题 高手请进

来源:百度知道 编辑:UC知道 时间:2024/05/20 17:30:39
错误类型:
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配
/schoolsite/test/date.asp, 第 33 行

浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TencentTraveler ; .NET CLR 2.0.50727)

网页:
GET /schoolsite/test/date.asp

<%
d="2006-1-3"
e="2006-2-2"

dim jiage
jiage="1,2,3,4,5,6,7,8,9,10,11,12"

b=DateAdd("m", 1, d)
c=year(b)&"-"&month(b)&"-1"
n=datediff("d",d,c) '得到当月的剩余天数

sc=datediff("d",d,e) '两个日期的相差天数

dd=sc-n '相差天数减剩余天,如果大0则换月

if dd > 0 then
nn=dd * (yuejia(e,jiage))
jia=nn + (n * (yuejia(d,jiage)))
else
jia=sc * yuejia(d,jiage)
end if

response.write jia

function yuejia(mmonth,jiagestr)
if mmonth="" or IsDate(mmonth)=False then
yuejiastr=0
exit function
else
mmonth=month(

Function函数用错了!

Function yuejia(mmonth,jiagestr)
'若中途Exit Function必须给变量yuejia(必须与程序名相同)赋值
'在End Function之前必须给变量yuejia(必须与程序名相同)赋值
'该yuejia变量是程序默认变量,作为存放返回值使用的变量
End Function