asp.net 光棒效应实现代码
程序员文章站
2024-03-09 09:25:35
复制代码 代码如下: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;");
}
}
上一篇: Java命令设计模式详解