在最初的成功回调中,您将从responseText中获取html内容,在第二种情况下,您应该这样做:
success: function(res) { $(res.responseText).find('div.content').each(function(){ $('#here').append($(this).html()); });使用class =“ content”或id应该可以。但是,您应该注意,上面的代码将所有具有类内容的 div 添加到您的id =“ here”
div中,而这可能并不是您想要的。如果只需要特定元素的内容,请使用其 ID 。



