
使用$ .when
var postobj = { id: workoutId};var getWorkout = $.post("./RowingWorkouts/GetWorkoutUsingId", postobj);var getDiet = $.post("./Diet/GetDietUsingId", postobj);var getFeedback = $.post("./RowingWorkouts/GetWorkoutFeedback", postobj);// When all three are successful - I haven't gotten the when syntax to actually work yet$.when(getWorkout, getDiet, getFeedback).done(function (workout, diet, feedback) { //each of the parameter is an array renderCharts(workout[0], diet[0], feedback[0])});欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)