错误提示: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个回答
启帆信息
2024-11-19 广告
2024-11-19 广告
启帆信息是英伟达中国区代理商,原厂授权代理,提供全面的软件技术解决方案以及NVIDIA以太网产品、交换机等产品,欢迎前来咨询!...
点击进入详情页
本回答由启帆信息提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询