在GridView的相应事件下添加代码实现通过对Javascript鼠标事件onmouseover与onmouseout来实现鼠标滑过时改变背景颜色代码如下 protected void GVYWZhuangBeiCategory_RowDataBound(object sender GridViewRowEventArgs e) { if (eRowRowType == DataControlRowTypeDataRow) { //高亮显示指定行 eRowAttributesAdd(onMouseOver Color=thisstylebackgroundColor;thisstylebackgroundColor=#FFF); eRowAttributesAdd(onMouseOut thisstylebackgroundColor=Color;); } } |