zoukankan      html  css  js  c++  java
  • GridView移动行变色

    1.
            protected void myGridView_RowDataBound(object sender, GridViewRowEventArgs e)
            
    {
                
    //if (e.Row.RowType == DataControlRowType.Header)
                
    //{
                
    //    e.Row.Attributes.Add("style", "background-image:url('./HeadImages/headeImage.jpg')");
                
    //}
                if (e.Row.RowType == DataControlRowType.DataRow)
                
    {
                    
    //e.Row.Attributes["onmouseover"] = "ItemOver(this)";
                    e.Row.Attributes.Add("onmouseover""e=this.style.backgroundColor; this.style.backgroundColor='#EEEEEE'");
                    e.Row.Attributes.Add(
    "onmouseout""this.style.backgroundColor=e");
                }

            }

    2.
    e.Row.Attributes["onmouseover"= "ItemOver(this)";
    if (!objbeforeItem)
    {
        
    var objbeforeItem=null;
        
    var objbeforeItembackgroundColor=null;
    }
        
    function ItemOver(obj)
    {
        
    if(objbeforeItem)
        
    {
            objbeforeItem.style.backgroundColor 
    = objbeforeItembackgroundColor;
        }

        objbeforeItembackgroundColor 
    = obj.style.backgroundColor;
        objbeforeItem 
    = obj;
        obj.style.backgroundColor 
    = "#B9D1F3";     
    }
  • 相关阅读:
    数据可视化
    numpy知识点
    机器学习之支持向量机
    python中字符编码及unicode和utf-8区别
    hihocoder图像算子(高斯消元)
    scrapy
    线性规划问题求解(单纯形法)
    机器学习之隐含马尔可夫
    机器学习之决策树
    机器学习之逻辑回归与最大熵模型
  • 原文地址:https://www.cnblogs.com/cnaspnet/p/1242230.html
Copyright © 2011-2022 走看看