光棒效果

来源:互联网 发布:软件开发工作总结 编辑:程序博客网 时间:2024/04/27 17:59

  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");

}
        }