2、在“gridview1_rowdatabound ”方法下加入下列代码:
if (e.row.rowtype == datacontrolrowtype.datarow)
...{
//鼠标移动到每项时颜色交替效果
e.row.attributes.add("onmouseout", "this.style.backgroundcolor='white';this.style.color='#003399'");
e.row.attributes.add("onmouseover", "this.style.backgroundcolor='#6699ff';this.style.color='#8c4510'"); 
}
新闻热点
疑难解答
图片精选