asp获取url 实现导航样式切换

发表于

<%
s001 = Request.ServerVariables("PATH_INFO")
s002=len(s001)
durl = mid(s001,2,s002)

%>


<script>
$('#nav li a').each(function(){
    if($(this).attr("href") == "<%=durl%>" || $(this).attr("href") == "<%=lm%>.asp" || $(this)[0].href==String(window.location)){
$(this).addClass('cur').siblings().removeClass('cur');} })
 </script>   

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注