jQueryのajax()で返り値を得る方法

jQueryのAjax()で返り値がとれない!? こんなふうに書くと返り値はundefinedになってしまう。 function test(){ $.ajax({ type: 'GET', url: 'http://hoge.fuga' dataType: 'text', success: function(response){ return response; }, error: function(response){ return response; }); } var result = test(); // undefined…