Home >php教程 >php手册 >自动识别当前页

自动识别当前页

WBOY
WBOYOriginal
2016-06-07 11:40:572179browse

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元

Statement:
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
Previous article:微信授权验证类Next article:PHPMailer 命名空间版