标签:blog http io os ar div sp cti log
//前端JS function CallHandlerByJquery() { var url = "http://" + window.location.hostname + "/Helper.ashx?FLAG=2&BIZINST_GUID=276259&callback=?&rand="+Math.random(); $.ajaxSettings.async = false; $.getJSON(url, function (data) { alert(data.state + "|" + data.msg); }); } //后台方法 public void ProcessRequest(HttpContext context) { string jsonResult = string.Empty; string callback = context.Request.QueryString["callback"]; //业务逻辑 jsonResult = "{state:‘0‘,msg:‘操作失败‘}"; } context.Response.ContentType = "application/json"; context.Response.Write(callback + "(" + jsonResult + ")"); context.ApplicationInstance.CompleteRequest();
标签:blog http io os ar div sp cti log
原文地址:http://www.cnblogs.com/Yang2012/p/3979427.html