Home > php教程 > php手册 > body text

自动识别当前页

WBOY
Release: 2016-06-07 11:40:57
Original
2157 people have browsed it

jq+css 获取当前页
jq    $(function (){            <br> url= document.location.pathname; <br>         $(".admin-menu a").each(function (){//.admin-menu 换成你自己的class<br>             href=$(this).attr("href");<br> <br>                if(href==url){<br>                    $(this).parent().addClass("active");<br>                }<br>         });<br>     });页面<ul> <br>              <li><a>会员管理</a></li> <br>                   <li><a>会员列表</a></li> <br>                   <li><a>会员等级</a></li> <br>                   <li><a>会员注册项</a></li> <br>                   <li><a>邮件短信设置</a></li> <br>                   <li><a>咨询管理</a></li>    <br> </ul>

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template