我該如何做兩個xhr.gets一個接一個地使用dojo?多個xhr.get與dojo
我....
require(["dojo/_base/xhr", "dojo/dom", "dojo/domReady!"],
function(xhr, dom) {
// Using xhr.get, as very little information is being sent
xhr.get({
// The URL of the request
url: "inc/etl2json.php?item=Execs",
// The success callback with result from server
load: function(execContent) {
dom.byId("Execs").innerHTML = execContent;
},
// The error handler
error: function() {
// Do nothing -- keep old content there
}
});
});
我想這樣做的另一個xhr.get到「INC/etl2json.php?項目=高管」並將其分配給dom.byId(」已逝「)。innerHTML = elapsedContent;