jQuery获取Ajax函数的返回值

参考自:

http://blog.csdn.net/crx05/article/details/7362252

function test() {

                var myText  = "";

                myText = $.ajax({

                    type: "POST",

                    url: "/dragable/demo/test",

                    async:false,

                    data: {},

                   // dataType: "json",

                    dataType: "text",

                    success: function(data){

                                            

                    }}).responseText;

                alert(myText);

}

 

你可能感兴趣的:(jquery)