简体   繁体   中英

Is AJAX success callback synchronous?

I know that AJAX is asynchronous. But what about the event execution inside the success callback? For example, if I have code like

$.ajax({
    url : 'example.com',
    type: 'GET',
    success : (dataFromServer) {
        event1();
        event2();
        event3();  
    }
})

Will they execute in order? Assuming event1(), event2(), and event3() are synchronous functions

是的,它们会被一个接一个地执行

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM