5555555555刚没有注意看
第2个标都了分类了……
部门 姓名
1 AA
1 bb
1 cc
2 a1
2 b1
具体如下
<% if request("sort")="" then %>
全部显示
<% else %>
<a href="show.asp">全部显示</a>
<% end if %>
<% set rs=server.CreateObject("adodb.recordset")
rs.CursorType=1
rs.Open "select * from sort",conn
on error resume next
%>
<% while not rs.eof %>
<% if rs("id")<>cint(request("sort")) then %>
<a href="show.asp?sort=<%=rs("id")%>"><%= rs("sort") %></a>
<% else %>
<a><%= rs("sort") %></a>
<% end if %>
<%
rs.movenext
wend
rs.close
set rs=nothing
%>