GridView 鼠标悬浮、移开变色

 protected void SbzGridView_RowDataBound(object sender, GridViewRowEventArgs e)
        {

            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                //鼠标悬浮变色
                e.Row.Attributes.Add("onmouseover", "color = this.style.backgroundColor;this.style.backgroundColor='#fc0'");
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=color");
            }}
原文地址:https://www.cnblogs.com/shadow-wolf/p/8336014.html