在ajax请求体外得到请求 数据

 1   function sendAjax() {
 2         $.ajax({
 3             type: "post",
 4             url: "/flow/process/trace.afca?pid=" + pid + "&ratio=1.3",
 5             dataType: 'json',
 6             async: false,
 7             success: function (response) {
 8                 getDate = response;
 9             }
10         });
11         return getDate;
12     }
13 
14     setInterval(function () {
15         sendAjax();
16         newDate = getDate;
17         return newDate
18     }(), 3000);
原文地址:https://www.cnblogs.com/yangguoe/p/9155253.html