开发者

Retrieve data from $.ajax function in javascript

I have used $.ajax function to fetch data from C# in asp.net MVC3.0, Now I want is to get the value from the success function of $.ajax and used it in another function defining global variable and putting the result in it is not working so plea开发者_StackOverflow中文版se let me know how can I get the value.


Invoke a callback function from within the success function. Most likely you are treating everything as synchronous when infact Ajax is asynchronous.

Low down dirty way would probably be to specify async:false

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜