给你一个,方法很笨,也慢,怕不适合你,也不妨一试。效果在www.wlxm.com/stores.asp页面左上部,完全asp语名实现
<%
id=request.querystring("id")
if ""&session("sid")&""=""&id&"" then
session("sid")=""
else
session("sid")=id
end if
%>
--上部开关代码
<table width=162 border=0 cellpadding=0 cellspacing=0 height="52" bordercolor="#FF00FF">
<tr>
<td height="7" width="209" class="newfont1" background="images/ttop.jpg">
商品类别
</td>
</tr>
<%
set rsp=server.createobject("adodb.recordset")
rsp.open "select * from sorts order by onum",conn,3
if not rsp.eof then
for i=0 to rsp.recordcount-1
simg="+"
simge="e+"
if ""&rsp("id")&""=""&session("sid")&"" then simg="-":simge="e-"
%>
<tr>
<td height="21" width="209">
<p style="margin-left: 10">
<a href="stores.asp?id=<%=rsp("id")%>"><%rsp.movenext%><%if not rsp.eof then%><img border="0" src="images/<%=simg%>.gif"><%else%><img border="0" src="images/<%=simge%>.gif"><%end if%><%rsp.moveprevious%><a href="stores.asp?sort=<%=rsp("id")%>"><font color="#000080" size="2"><%=rsp("name")%></font></a>
</p>
</td>
</tr>
<%
if ""&rsp("id")&""=""&session("sid")&"" then
set rsc=server.createobject("adodb.recordset")
rsc.open "select * from stores where sort="&rsp("id")&"",conn,3
if not rsc.eof then
for j=0 to rsc.recordcount-1
%>
<tr>
<td height="18" width="209">
<p style="margin-left: 10">
<font color="#0000FF">
<%rsp.movenext%><%if not rsp.eof then%><img border="0" src="images/l01.gif"><%end if%><%rsp.moveprevious%><%rsc.movenext%><%if not rsc.eof then%><img border="0" src="images/ktr.gif"><%else%><img border="0" src="images/ltr.gif"><%end if%><%rsc.moveprevious%><a href="stores.asp?sort=<%=rsc("sort")%>&sid=<%=rsc("id")%>"><%=rsc("name")%></a></font>
</p>
</td>
</tr>
<%
rsc.movenext
next
end if
set rsc=nothing
end if
rsp.movenext
next
else
%>
<tr>
<td height="18" width="209">
<font color="#FF00FF">还没有商品类别!</font>
</td>
</tr>
<%
end if
set rsp=nothing
%>
</table>
--实现部分代码。其中'+'、'-'等为图片,可去那里down下来。