getJSON does not honor async:false

后端 未结 4 1868
伪装坚强ぢ
伪装坚强ぢ 2021-01-22 05:26

I have this code below, which is supposed to return the result of the call. I need to do this synchronously so that I know everything is good, however it doesn\'t seem to work.

4条回答
  •  我在风中等你
    2021-01-22 06:22

    I just insert this code before getJSON:

    $.ajaxSetup({
        async: false
    });
    

    Original answer: Is it possible to set async:false to $.getJSON call

提交回复
热议问题