0
我最近纔開始使用dojo,並且正在使用dojo xhrGet,xhrPost,等進行多次ajax調用。現在我有一個動畫gif圖像,我想用來指示「加載」給用戶。我不太確定如何做到這一點。有人可以請教我這個嗎?這裏是我的代碼,帶dojo XHR請求的加載指示器
dojo.xhrGet({
url: registcarturl,
handleAs: "json",
preventCache: true,
load: function(data, ioArgs) {
//DO STUFF WITH data HERE
},
error: function(error) {
alert("sorry ! an error occurred while adding to the cart with ajax");
}
});
如何讓我的加載gif文件進入交互?謝謝。