Load part page with jQuery & AJAX

后端 未结 2 466
一个人的身影
一个人的身影 2021-02-08 13:26

I have a list of dynamic links on page A and a div where I wish to load content from another dynamically generated page B based on PHP variables.



        
2条回答
  •  既然无缘
    2021-02-08 13:45

    You could use .load as in

    $("#ajaxContent").load($(this).attr("href") + " #named-div");
    

    Otherwise, parse the response yourself:

    $("#ajaxContent").html($(response).find("#named-div"));
    

提交回复
热议问题