vardfd=$.Deferred();//第一步setTimeout(function(){dfd.resolve(10);},1000);//第二步等待第一步返回后执行dfd.then(function(data){console.log('Step1Result:'+data);//第一步的结果10returnsetTimeout(function(){returndata*data;//第二步的结果100这里如何将100返回到第三步能用},1000);})//第三步等待第二部返回的结果执行.then(function(data){console.log('Step2Result:'+data);//这里如何获取第二步的结果?})
添加回答
举报
0/150
提交
取消
