GridView 鼠標懸浮、移開變色

 protected void SbzGridView_RowDataBound(object sender, GridViewRowEventArgs e)
        {

            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                //鼠標懸浮變色
                e.Row.Attributes.Add("onmouseover", "color = this.style.backgroundColor;this.style.backgroundColor='#fc0'");
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=color");
            }}
相關文章
相關標籤/搜索