GridView鼠标滑过变色

来源:互联网 发布:mysql下载64位 编辑:程序博客网 时间:2024/04/20 18:22
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)        {            //判断是否是DataRow,以防止鼠标经过Header也有效果              if (e.Row.RowType == DataControlRowType.DataRow)            {                e.Row.Attributes.Add("onmouseover", "e=this.style.backgroundColor; this.style.backgroundColor='#c8dafa'");                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=e");            }        }
留在这里备份
原创粉丝点击