async-ajax call not working as expected

后端 未结 2 1182
死守一世寂寞
死守一世寂寞 2021-01-27 01:20

Setup:

I am doing an ajax-jsonp call, which is working fine. The callback function of this changes value of a variable, \"myVaraible\". Just after the c

2条回答
  •  情歌与酒
    2021-01-27 02:07

    From the $.ajax documentation:

    Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation

    So, you'll need to put anything that relies on the results of the request in the callback.

提交回复
热议问题