日期:2014-05-17 浏览次数:20424 次
$("#Submit1").click(function () { $.ajax({ type:"POST", url:"Ajax.ashx", data: { arr:[1,2,3,4,5] //测试以数组方式传递 }, success:function(data){ alert(data); } }) })
public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/plain"; string arr = context.Request["arr"]; string[] myarr = arr.Split(','); context.Response.Write(myarr[0]); }