protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        
//如果是绑定数据行 
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //鼠标移入时,行背景色变 
            e.Row.Attributes.Add(
"onmouseover""this.style.backgroundColor='#ff9900'");
            
//鼠标移出时,行背景色变 
            e.Row.Attributes.Add("onmouseout""this.style.backgroundColor='#ffffff'");
        }
    }

相关文章:

  • 2022-12-23
  • 2021-06-14
  • 2021-07-01
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-26
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
相关资源
相似解决方案