错误提示:Microsoft JScript 运行时错误: 'c' 未定义,怎么改?在先等,
protectedvoidgrdList_RowDataBound(objectsender,GridViewRowEventArgse){if(e.Row.RowTyp...
protected void grdList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
XZ_Line = e.Row.RowIndex;
e.Row.Attributes["OnClick"] = ClientScript.GetPostBackEventReference(e.Row.Parent.Parent, "Select$" + e.Row.RowIndex);
e.Row.Attributes.Add("onMouseOver", "var c=this.style.backgroundColor;this.style.backgroundColor='#ebebce");
e.Row.Attributes.Add("onMouseOver", "this.style.backgroundColor='#ebebce");
e.Row.Attributes.Add("onMouseOut", "this.style.backgroundColor=c");//错误的那一行
e.Row.Attributes.CssStyle.Add("cursor", "hand");
}
} 展开
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
XZ_Line = e.Row.RowIndex;
e.Row.Attributes["OnClick"] = ClientScript.GetPostBackEventReference(e.Row.Parent.Parent, "Select$" + e.Row.RowIndex);
e.Row.Attributes.Add("onMouseOver", "var c=this.style.backgroundColor;this.style.backgroundColor='#ebebce");
e.Row.Attributes.Add("onMouseOver", "this.style.backgroundColor='#ebebce");
e.Row.Attributes.Add("onMouseOut", "this.style.backgroundColor=c");//错误的那一行
e.Row.Attributes.CssStyle.Add("cursor", "hand");
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询