<!
<style>
border
}
text
font
}
font
}
</style>
<script language="javascript教程">
function $$(id)
{
return document
}
function fd(id
{
t=$$("d_"+id)
if(t
{
t
t
}
else
{
t
t
}
for(i=
{
$$("c"+id+"_"+i)
$$("d_"+id)
}
}
</script>
<%
catstr=""
depath=
Call cat
%>
<TABLE width="
<TR>
<TD><%=catstr%></TD>
</TR>
</TABLE>
<%
function cat
set rs
sql="select cat_name
set rs
If rs
Else
if(depath>
display
else
display
end if
dim j
j=
do while not rs
cat_name
cat_id
parent_id
******************下面是你要顯示的******************
m
sql
set rs
set rs
if not rs
m
else
m
end if
rs
if(depath<=
mgif="images/
a="block"
else
if(m
mgif="images/+
else
mgif="images/
end if
if(depath=
a="block"
else
a="none"
end if
end If
If cat_id
a="block"
mgif="images/+
ElseIf cat_id
a="none"
mgif="images/
else
End if
catstr=catstr & "<tr id=""c"&parent_id&"_"&j&""" style=""display:"&a&"""><td width=""
for i=
catstr=catstr&" "
Next
catstr=catstr&"<img src="""&mgif&""" width=""
if(m
catstr=catstr&"<a href=""javascript:void(
else
catstr=catstr&"<a href=""products
end if
If depath=
cat_name
End If
catstr=catstr&cat_name
m
sql
set rs
set rs
if not rs
depath=depath+
call cat
end if
rs
set rs
depath=depath
******************上面是你要顯示的******************
j=j+
rs
loop
End If
rs
set rs
end Function
%>
數據庫教程連接文件adoconn
<%@LANGUAGE="VBSCRIPT" CODEPAGE="
<%
response
response
DB="db
path=Server
set conn=server
connstr="provider=Microsoft
conn
Set rs=server
%>
From:http://tw.wingwit.com/Article/program/net/201311/14405.html