GridView鼠标移过变色

来源:互联网 发布:淘宝比价网官网 编辑:程序博客网 时间:2024/04/25 13:59

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover","this.style.backgroundColor='#E6F5FA'");
            e.Row.Attributes.Add("onmouseoUT", "this.style.backgroundColor='#FFFFFF'");
        }
    }

原创粉丝点击