Async false for shorthand AJAX get request

前端 未结 5 1083
梦毁少年i
梦毁少年i 2020-12-11 02:00

I am using the following ajax get function to check the status of a user. Is it possible to set async: false with this shorthand method? If not how can this be

5条回答
  •  甜味超标
    2020-12-11 02:33

    Use jQuery.ajaxSetup({async:false}); because $.get() is Jquery shorthand method with syntax jQuery.get( url [, data ] [, success ] [, dataType ] ) and to make changes to setting there is jQuery.get( [settings ] )

提交回复
热议问题