var promise = new Promise( function( resolve, reject ){
function onServiceSuccess( data ){
resolve( data )
}
function onServiceFail( data ){
reject( data ) ;
}
tempLoadUtils.loadURL(url, "GET", null, 10000, 3, onServiceSuccess, onServiceFail );
}) ;
var a;
promise.then(function(result) {
console.log(result); // 「完美!」
}, function(err) {
console.log(err); // Error: "出問題了"
});
}