能给出具体例子吗?我写了一个递归调用函数,可是只能循环出第一枝,大家看看:
<%
function tree(officeid)
sql="select * from officedb where officeparents='"&officeid&"'"
set rs1=conn.Execute(sql)
if rs1.bof or rs1.eof then
else
while rs1.eof=false
%>
<tr><td><input type="button" value=<%=rs1("officename")%> onclick="window.open('discdisp.asp?officeid=<%=rs1("officeid")%>','discdisp','width=640,height=480,toolbar=no,menubar=no')"></td>
<td>
<table>
<%
tree(rs1("officeid"))
%>
</table>
</td></tr>
<%
rs1.movenext
wend
end if
end function
%>
有什么逻辑问题吗?