处理业务数据,产生JSon数据.代码如下:
protected void Page_Load(object sender, EventArgs e)
{
string u = Request["UserName"];
string p = Request["Password"];
string output = string.Format("'UserName':'{0}','Password':'{1}'", u, p);
Response.Write("[{");
Response.Write(output);
Response.Write("}]");
Response.End();
}
详细:http://www.veryhuo.com/a/view/14293.html
后台返回值后,$.ajax中sucess会接收
success:function(d){
var datas=eval('('+d+')');
var s="";
for(var i=0;i
}
alert(s);
}