日期:2014-05-17  浏览次数:21254 次

50分求解ASP一小问题,急!!!
小弟有一网站,头部一导航栏是这样的:
<div   id= "topmenu ">  
            <ul>
                <li   id= "checked "> <a   href= "index.asp "> 首   页 </a> </li>
                <li> <a   href= "enterprise/index.asp "> 企业服务 </a> </li>
                <li> <a   href= "user/index.asp "> 个人服务 </a> </li>
<li> <a   href= "yingjie.asp "> 校园招聘 </a> </li>
<li> <a   href= "news/index.asp "   target= "_blank "> 职场指南 </a> </li>
<li> <a   href= "blog/index.asp "   target= "_blank "> 人才播客 </a> </li>
            </ul>
</div>

我所有页面的头部都是这样的,唯一的区别就是当我访问哪个栏目的时候,该栏目名称的样式就是这样:
<li   id= "chenked "> 这里是栏目名称 </li>
比如当我访问“校园招聘”的时候,代码就是这样:
<li   id= "checked "> <a   href= "yingjie.asp "   target= "_blank "> 校园招聘 </a> </li>
即该 <li> 的样式为id= "checked ",否则该 <li> 样式为空

因为所有页面的头部都是这样的,而且我也不想每个栏目都做一个头部文件,我就是想如何用ASP语句来实现,请问各位路过的达人如何实现???

在线等,急用。先谢了~~~

------解决方案--------------------
我的方法比较土,希望有高人再次指点
我的方法是
<div id= "topmenu ">
<ul>
<li <%if request( "check ")= " " or request( "check ")=1 then%> id= "checked " <%end if%> > <a href= "index.asp?check=1 "> 首 页 </a> </li>
<li <%if request( "check ")=2 then%> id= "checked " <%end if%> > <a href= "enterprise/index.asp?check=2 "> 企业服务 </a> </li>
<li <%if request( "check ")=3 then%> id= "checked " <%end if%> > <a href= "user/index.asp?check=3 "> 个人服务 </a> </li>
<li <%if request( "check ")=4 then%> id= "checked " <%end if%> > <a href= "yingjie.asp?check=4 "> 校园招聘 </a> </li>
<li <%if request( "check ")=5 then%> id= "checked " <%end if%> > <a href= "news/index.asp?check=5 " target= "_blank "> 职场指南 </a> </li>
<li <%if request( "check ")=6 then%> id= "checked " <%end if%> > <a href= "blog/index.asp?check=6 " target= "_blank "> 人才播客 </a> </li>
</ul>
</div>
------解决方案--------------------
<%action=trim(Request( "action "))
if action= "a " then checka= "id= 'checked ' "
if action= "b " then checkb= "id= 'checked ' "
if action= "c " then checkc= "id= 'checked ' "
if action= "d " then checkd= "id= 'checked ' "
if action= "e " then checke= "id= 'checked ' "
if action= "f " then checkf= "id= 'checked ' " %>
<div id= "topmenu ">
<ul>
<li <%=checka%> > <a href= "index.asp?action= 'a ' &qu