deferred.promise( [target] ) 1.5追å æ»ãå¤:Promise Deferredã®promiseãªãã¸ã§ã¯ããè¿ãã¾ãã å¼æ° 説æ function asyncEvent(){ var dfd = new jQuery.Deferred(); // Resolve after a random interval setTimeout(function(){ dfd.resolve("hurray"); }, Math.floor(400+Math.random()*2000)); // Reject after a random interval setTimeout(function(){ dfd.reject("sorry"); }, Math.floor(400+Math.random()*2000)); // Show a "working..."
{{#tags}}- {{label}}
{{/tags}}