我如何在jQuery AJAX函数中按顺序执行事件 [英] How can i execute the events in sequence in jquery AJAX function

查看:168
本文介绍了我如何在jQuery AJAX函数中按顺序执行事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个功能

$.ajax({
    type: 'GET',
    url: myurl,
    success: function (data) {
        $('#dialog-confirm').html(data);
        $('#dialog-confirm').dialog('open');
    }
});

我希望在第一个函数完成后成功执行第二个函数.我该怎么办

I want that second function in success executes after first one is complete. how can i do that

推荐答案

可以,因为.html是同步的.

如果不这样做,那么我们需要更多信息.

If it's not doing that then we need more information.

这篇关于我如何在jQuery AJAX函数中按顺序执行事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆