62,267
社区成员
发帖
与我相关
我的任务
分享linkbutton.Attribut.Add("onmouseover",""Javascript return document.getElementById(linkbutton.ClientID).value"); linkbutton.Attribut.Add("onmouseover","Javascript:linkbutton.Attribut.Add("onmouseover","//这里的要取得这个linkbutton的Text"); ");
public static void SetRowColorForMouse(System.Web.UI.WebControls.GridViewRowEventArgs e, string color)
{
if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "e=this.style.backgroundColor; this.style.backgroundColor='" + color + "';");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=e");
}
}