[求助]判断类型为“2004.06.23”格式的函数
wylf 2005-06-20 07:32:43 以下是我写的判断类型如“2004.06.23”格式的函数
dim bs
bs=0
function check(str)
str=trim(str)
if len(str)<>10 then
bs=1
else
for i=1 to 10
a= asc(mid(str,i,1))
if i<>5 and i<>8 then
if a>47 and a<58 then
else
bs=1
end if
else
end if
next
end if
end function
但是运行时显示
错误类型:
Microsoft VBScript 运行时错误 (0x800A005E)
无效使用 Null: 'mid(...)'
请帮忙找找错误 ,急!