注册 登录
编程论坛 ASP技术论坛

代码解读

TZTJ 发布于 2010-06-26 10:30, 488 次点击
恳请各位高手解读一下以下代码,本人觉得它好象有错误.

for each element in request.form
  for i=1 to request.form(element).count
    if instr(element,"NO")<>0 then
      id=mid(element,3,3)
      result=request.form(element)(i)
if rs("type")="多选题" then
        if instr(rs("answer"),result)<>0 then
          score=score+cint(multiper)/4
          j=j+1
          answer=split(rs("answer"),",")
          answercount=ubound(answer)+1
          if answercount=j then
            score=score+cint(multiper)*(1-j/4)
          end if
        else
          score=score-cint(multiper)/4*(j)
        end if      
      end if
end if
next
next
2 回复
#2
TZTJ2010-06-27 22:07
希望得到帮助!
#3
yms1232010-06-28 13:51
用了双循环,关键是那个算法
1