在asp中如何实现导航菜单当前页特殊样式
最终效果代码如这样的:<ul<li><ahref="custom.asp?id=113">栏目一</a></li><liclass="on"><ahref="custom...
最终效果代码如这样的:
<ul
<li><a href="custom.asp?id=113">栏目一</a></li>
<li class="on"><a href="custom.asp?id=189">栏目二</a></li>
<li><a href="custom.asp?id=210">栏目三</a></li>
</ul>
我ASP页的动态代码:
<UL>
<%
Set rs = server.CreateObject("adodb.recordset")
sql = "select * from pf_custom where pf_custom_parent = 0 order by pf_custom_order asc"
rs.Open sql, conn, 1, 1
Do While Not rs.EOF
%>
<LI><a href="custom.asp?id=<%=rs("ID")%>"><%=rs("pf_custom_name")%></a></LI>
<%
Set rss = server.CreateObject("adodb.recordset")
sql = "select * from pf_custom where pf_custom_parent = "&rs("ID")&" order by pf_custom_order asc"
rss.Open sql, conn, 1, 1
Do While Not rss.EOF
%>
<%
rss.movenext
Loop
rss.Close
Set rss = Nothing
rs.movenext
Loop
rs.Close
Set rs = Nothing
%>
</UL>
请兄弟们帮忙下
怎么样在这句<LI><a href="custom.asp?id=<%=rs("ID")%>"><%=rs("pf_custom_name")%></a></LI>里添加判断代码 展开
<ul
<li><a href="custom.asp?id=113">栏目一</a></li>
<li class="on"><a href="custom.asp?id=189">栏目二</a></li>
<li><a href="custom.asp?id=210">栏目三</a></li>
</ul>
我ASP页的动态代码:
<UL>
<%
Set rs = server.CreateObject("adodb.recordset")
sql = "select * from pf_custom where pf_custom_parent = 0 order by pf_custom_order asc"
rs.Open sql, conn, 1, 1
Do While Not rs.EOF
%>
<LI><a href="custom.asp?id=<%=rs("ID")%>"><%=rs("pf_custom_name")%></a></LI>
<%
Set rss = server.CreateObject("adodb.recordset")
sql = "select * from pf_custom where pf_custom_parent = "&rs("ID")&" order by pf_custom_order asc"
rss.Open sql, conn, 1, 1
Do While Not rss.EOF
%>
<%
rss.movenext
Loop
rss.Close
Set rss = Nothing
rs.movenext
Loop
rs.Close
Set rs = Nothing
%>
</UL>
请兄弟们帮忙下
怎么样在这句<LI><a href="custom.asp?id=<%=rs("ID")%>"><%=rs("pf_custom_name")%></a></LI>里添加判断代码 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询