📜  如何在 ajax 中添加 ajax - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:38.935000             🧑  作者: Mango

代码示例1
$.ajax({
        type: "post",
        url: "ajax/example.php",
        data: 'page=' + btn_page,
        success: function (data) {
            var a = data; 
            $.ajax({
                type: "post",
                url: "example.php",
                data: 'page=' + a,
                success: function (data) {

                }
                error: function (xhr) {
                   console.log(xhr.responseText); //saves alot of time during debugging
                }
            });
        }
    });