您的位置:首页 > Web前端 > JavaScript

后台调用前台的JS代码并传参数给前台

2007-07-17 15:01 337 查看
void gridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string id = DataBinder.Eval(e.Row.DataItem, "id").ToString();
e.Row.Attributes.Add("style", "cursor:pointer");
e.Row.Attributes.Add("onclick", string.Format("test('{0}',this)", id));    //调用前台的test
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: