Function GetClassChild(ClassID) '查询指定栏目ID的子栏目ID set GetClassChildIDRs=server.CreateObject("adodb.recordset") GetClassChildIDSql="select arrChildID from PE_Class where ClassID="&ClassID GetClassChildIDRs.open GetClassChildIDSql,conn,3,1 ClassChildID=GetClassChildIDRs("arrChildID") GetClassChildIDArr=split(ClassChildID,",") for i = 0 to ubound(GetClassChildIDArr) set GetClassChildRs=server.CreateObject("adodb.recordset") '查询指定栏目ID的栏目名 GetClassChildSql="select ClassName from PE_Class where ClassID="&GetClassChildIDArr(i) GetClassChildRs.open GetClassChildSql,conn,3,1 GetClassChild=GetClassChild&"<a href='/lines/ShowClass.asp?ClassID="&GetClassChildIDArr(i)&"' target='_blank'>"&GetClassChildRs("ClassName")&"</a> " GetClassChildRs.close set GetClassChildRs=nothing next GetClassChildIDRs.close set GetClassChildIDRs=nothing End Function