Loading Content using Ajax with PHP Include

前端 未结 5 1203
旧时难觅i
旧时难觅i 2021-01-28 18:15

I have a PHP page which has a div, the div has a PHP includes which includes this file:



        
5条回答
  •  别那么骄傲
    2021-01-28 18:43

    Use this instead of your code

    var page = 1;
    $(document).on('click','.Button',function(){
    
        $("#posts").load("miniBlog.php", function(response, status, xhr) {
            if (status == "error") {
                var msg = "Error!: ";
                alert(msg);
            }
        });
        page++;
    });
    

提交回复
热议问题