当前位置:Gxlcms > JavaScript > 探讨在JQuery和Js中,如何让ajax执行完后再继续往下执行

探讨在JQuery和Js中,如何让ajax执行完后再继续往下执行

时间:2021-07-01 10:21:17 帮助过:2人阅读

代码如下:
  $.ajax
       ({
            cache: false,
            async: false,   // 太关键了,学习了,同步和异步的参数
            dataType: 'json', type: 'post',
            url: "../handle/Ladder_Fee_Code.ashx?ajaxaction=Select_FangAn",
            success: function (data)
            {
             alert("1");
            }
        });
             alert("2");

人气教程排行