zoukankan      html  css  js  c++  java
  • jQuery改变GridView的样式

     protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            
    if (e.Row.RowType == DataControlRowType.DataRow)
            {
                e.Row.Attributes.Add(
    "onmouseover""c=this.style.backgroundColor;this.style.backgroundColor='#B9D3EE'");
                e.Row.Attributes.Add(
    "onmouseout""this.style.backgroundColor=c");
            }
        }

     也可以利用JQUERY实现相关的功能

                //变色
                $("tr").filter(function(){
                    
    return $('td',this).length && !$('table',this).length
                 }).css({ background:
    "ffffff" }).hover(
                        
    function(){$(this).css({background:"#C1DAD7"});},
                        
    function(){$(this).css({background:"#ffffff"});}
                 );

     实例代码

  • 相关阅读:
    重写Override和重加载Overload
    Java 继承
    poj 3263 Tallest Cow
    矩阵求和
    全排列
    最大乘积
    三角形面积
    Sum
    搭积木
    调手表
  • 原文地址:https://www.cnblogs.com/chenqingwei/p/1689808.html
Copyright © 2011-2022 走看看