62,254
社区成员
发帖
与我相关
我的任务
分享if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", "cc('" + e.Row.Cells[0].Text + "','" + e.Row.Cells[1].Text + "','" + e.Row.Cells[2].Text + "')");
} function vv()
{
var result=showModalDialog('subpage.aspx','subpage','dialogWidth:400px;dialogHeight:300px;center:yes;help:no;resizable:no;status:no'); //打开模态子窗体,并获取返回值
document.getElementById("txt_id").value=result.split("'")[0]; //返回值分别赋值给相关文本框
document.getElementById("txt_name").value=result.split("'")[1];
document.getElementById("txt_pwd").value=result.split("'")[2];
} function cc(infor_id,infor_name,infor_psw) //参数分别为id,name和password
{
window.returnValue= infor_id+"'"+infor_name+"'"+infor_psw; //返回值
window.close();
}if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", "cc('" + this.GridView1.Rows[0].Cells[0].Text + "','" + this.GridView1.Rows[0].Cells[1].Text + "','" + this.GridView1.Rows[0].Cells[2].Text + "')");
}