这是一个简单的通过递归计算阶乘的例子:Private Function MySub(i As Integer) As Long
  If i <= 1 Then MySub = 1 Else MySub = i * MySub(i - 1)
End Function

解决方案 »

  1.   

    sub myesub(id)
    ......myesub(.....)
    ......end sub
      

  2.   

    我还有一个问题我的程序是这样的
    function myquery(parentid)
    rs.open "select * from m_class where ParentId="&parentid,cn,1
    if rs.recordcount<>0 then 
    response.write("<table width=100% border=0 cellspacing=0 cellpadding=0>")
    while not rs.eof
    classname=rs("ClassName")
    parentid1=rs("ClassId")
    response.write"<tr><td>&nbsp;</td>"_
                  &"<td >"&classname&"</td>"_
      &"</tr>"_
      &"<tr><td>&nbsp;</td>"_
      &"<td>"
      myquery(parentid1)  
    response.write"</td></tr>"
      rs.movenext
      wend
      rs.close
      response.write"</table>"
    end if
    end function但是不行啊,rs.movenext通不过 怎么办呢