ASP源码中的一个function函数调用问题
源代码如下,这是一个栏目导航源码。数据库中有6条记录。可是调用显示出来只有4条。懂的大侠看看FunctionleMenu(DateDase,List) &nbs...
源代码如下,这是一个栏目导航源码。数据库中有6条记录。可是调用显示出来只有4条。懂的大侠看看Function leMenu(DateDase,List) set rsm=conn.execute("select * from "&DateDase&" Where TopID=0 order by num asc") I=0 do while not rsm.eof I=I+1 Response.Write("<div id='parent"&I&"'>") Response.Write("<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'><tr height='20'>") Response.Write("<td width='10%'><a href='#' onClick='expand("&I&")'><img src='images/jia.gif' border='0'></a></td>") Response.Write("<td width='90%'><a href='"&SitePath&""&list&"_list.asp?ClassId="&rsm("ID")&"&Topid="&rsm("TopID")&"' ><b>"&rsm("ClassName")&"</b></a></td></tr></table></div>") If Mydb("Select Count([ID]) From "&DateDase&" Where TopID="&rsm("ID")&"",1)(0)>0 then Sqlpp ="select * from "&DateDase&" Where TopID="&rsm("ID")&" order by num asc" Set rsu=server.CreateObject("adodb.recordset") rsm.open sqlpp,conn,1,1 Response.Write("<div id='child"&I&"' style='display:none;'>") Do while not rsu.Eof Response.Write("<DIV STYLE='height: 24px;padding-top: 2px;'> <Img src='images/jian.gif'> <a href='"&SitePath&""&list&"_list.asp?ClassId="&rsu("ID")&"&Topid="&rsu("TopID")&"'>"&rsu("ClassName")&"</a></div>") rsu.Movenext Loop Response.Write("</div>") rsu.close set rsu=nothing else Response.Write("<div id='child"&I&"' style='display:none;'></div>") end if rsm.movenext loop rsm.close set rsm=nothing End function
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询