Aspx Ajax 调用 C#函数处理数据

jquery ajax 调用后台函数

 1         var res;
 2         $.ajax({
 3             type: "POST",
 4             url: "fast_index_overview.aspx/GetOverViewZongLunContent",
 5             data: "{city:'" + regionCityName + "',time:'" + time + "'}",
 6             contentType: "application/json",
 7             dataType: "json",
 8             async: false,
 9             success: function (result) {
10                 try {
11                     res = eval('(' + result.d + ')')[0];
12                  
13                 } catch (e) {
14 
15                 } 
16             },
17             error: function(err) {
18                 res = "错误:" + err.d;
19             }
20         });
21 
22         console.log("获取数据:" + res);

 

posted @ 2016-09-09 09:06  googlegis  阅读(627)  评论(0编辑  收藏  举报

坐标合肥,非典型GIS开发人员 GitHub