搜索了一下,发现对于这种基本都使用girdview中的RowDataBound事件完成,下面看看网上提供的简单方法
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699ff';");
        e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor;");
    }
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-08-22
  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
猜你喜欢
  • 2021-11-27
  • 2022-01-06
  • 2021-11-12
  • 2022-12-23
  • 2021-05-13
相关资源
相似解决方案