zoukankan      html  css  js  c++  java
  • 动态修改母版页中的DIV标签中的LI的A的CLASS属性

    这个知识点比较简单,只是关于转义方面,或什么时候用双引号,什么时候单引号老搞不清,特此备忘之用

    <ul class="nav">
                            <!-- 实现点击当前页后,图片悬停在上面,如:点击首页,首页有图片效果,由于是母版页,每次点击都会刷新当前页面,因此用js无效 -->
                            <!-- 此种方式必须有真实存在的地址才可调用 -->
                            <li><a href="<%=Page.ResolveUrl("Index.aspx")%>" <%=Request.RawUrl.ToLower().Contains("index.aspx")?"class='in'":""%>>
                                <img src="images/icon01.png" width="45" height="40" />
                                <h2>首页</h2>
                            </a></li>
                            <li><a href="<%=Page.ResolveUrl("ContractManager.aspx")%>" <%=Request.RawUrl.ToLower().Contains("contractmanager.aspx")?"class='in'":""%>>
                                <img src="images/icon02.png" width="45" height="40" />
                                <h2>合同管理</h2>
                            </a></li>
                            <li><a href="<%=Page.ResolveUrl("CustomerManagerForm.aspx")%>" <%=Request.RawUrl.ToLower().Contains("customermanagerform.aspx")?"class='in'":""%>>
                                <img src="images/icon03.png" width="45" height="40" />
                                <h2>试用客户管理</h2>
                            </a></li>
                            <li><a href="<%=Page.ResolveUrl("MessageManager.aspx")%>" <%=Request.RawUrl.ToLower().Contains("messagemanager.aspx")?"class='in'":""%>>
                                <img src="images/icon04.png" width="45" height="40" />
                                <h2>协同工作</h2>
                            </a></li>
                            <li><a href="<%=Page.ResolveUrl("SystemManagement.aspx")%>" <%=Request.RawUrl.ToLower().Contains("systemmanagement.aspx")?"class='in'":""%>>
                                <img src="images/icon05.png" width="45" height="40" />
                                <h2>系统管理</h2>
                            </a></li>
                        </ul>
  • 相关阅读:
    多线程
    事务的概念与四大特性(ACID)
    Error和Exception的区别
    运算符的使用与注意事项(二)
    运算符的使用与注意事项(一)
    GOJS使用--前端拓扑图
    python算法实现分治法demo
    MySQL主从复制配置
    MySQL锁
    show profile查看SQL执行生命周期
  • 原文地址:https://www.cnblogs.com/chzbgb/p/6801537.html
Copyright © 2011-2022 走看看