28,409
社区成员




<%a="a,b,c"
b="a,b,c,d"
response.write getscore(a,b)
'a是正确答案字符串,b是答题答案字符串,已排序,返回0无分,1 N分,2全分
function getscore(a,b)
dim i,arr,f
if a=b then
getscore=2
exit function
end if
if b="" then
getscore=0
exit function
end if
f=false
arr=split(b,",")
for i=0 to ubound(arr)
if instr(","& a &",",","& arr(i) &",")=0 then
f=true
exit for
end if
next
if f then
getscore=0
else
getscore=1
end if
end function
%>