JQuery Deferred Chain
JQuery Deferred 链式参数参数写要then
$.get("http://localhost/Designer/Handlers/CommonService.ashx")
.then(function(data){
debugger;
return $.get("http://localhost/Designer/Handlers/StepActorConfigActualActor.ashx")
}).then(function(data){
debugger;})
如果你使用done 第二个done 中函数的参数还是第一个done的参数
$.get("http://localhost/Designer/Handlers/CommonService.ashx")
.done(function(data){
debugger;
return $.get("http://localhost/Designer/Handlers/StepActorConfigActualActor.ashx")
}).done(function(data){
debugger;})
ES5 Promse 链式写法的参数传递
fetch("http://localhost/Designer/Handlers/CommonService.ashx",{credentials: "include"})
.then(function(response){
debugger;
return fetch("http://localhost/Designer/Handlers/StepActorConfigActualActor.ashx",{credentials: "include"})
}).then(function(response){debugger;});
参数 https://stackoverflow.com/questions/17216438/chain-multiple-then-in-jquery-when