protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow) //判断是否是DataRow,以防止鼠标经过Header也有效果
{
e.Row.Attributes.Add("onmouseover", "e=this.style.backgroundColor; this.style.backgroundColor='#cccccc'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=e");
}
}
相关文章:
-
2022-12-23
-
2022-12-23
-
2021-11-04
-
2021-11-29
-
2021-08-11
-
2022-12-23
-
2022-12-23
猜你喜欢
-
2021-12-11
-
2021-06-15
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
相关资源
-
下载
2021-06-27
-
下载
2023-01-02
-
下载
2023-02-08
-
下载
2022-12-21
-
下载
2023-01-08