Database field: ID (automatic number), class_name (menu name), parentid (parent menu ID)
CopyCode The Code is as follows: <%
Dim m
M = 0
Call showtree (0) %>
<%
Sub showtree (parentid)
Dim s
M = m + 1
Dim rs
Set rs = server. Createobject ("ADODB. recordset ")
SQL = "select class_id, class_name from [wms_class] Where class_father_id =" & CINT (parentid)
Rs. Open SQL, Conn, 1, 1
If Rs. EOF and M = 1 then
Response. Write ("this channel has no topic ")
End if
Do while not Rs. EOF
Response. Write RS (0)
For n = 1 to m
If n = M and M = 1 then
Response. Write ("response ")
Elseif n = 1 then
Response. Write ("")
Elseif n = m then
Response. Write ("response ")
Else
Response. Write ("│ ")
End if
Next
Response. Write RS (1) & "<br>"
Call showtree (RS (0 ))
M = S-1
Rs. movenext
Loop
End sub
%>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service