asp.net 光棒效应实现代码
程序员文章站
2024-03-08 14:19:06
复制代码 代码如下:protected void gridview1_rowdatabound(object sender, gridviewroweventargs e)...
复制代码 代码如下:
protected void gridview1_rowdatabound(object sender, gridviewroweventargs e)
{
if (e.row.rowtype == datacontrolrowtype.datarow)
{
e.row.attributes.add("onmouseover", "javascript:currentcolor=this.style.backgroundcolor;this.style.backgroundcolor='#6699f';");
e.row.attributes.add("onmouseout", "javascript:this.style.backgroundcolor=currentcolor;");
}
}