开发者

Way to grab specific container from Ajax jQuery Call

Is there a way to make an Ajax call with jQuery to call a specific page, grab only a specific container on the page that is being called, and inject the dat开发者_运维问答a from that container into a new container? Does that make any sense?


It is possible. Something like:

jQuery.get('index.html', function (data) {
  $('.container').html($(data).find('.container'));
});

However, it seems a bit strange to do this. The standard is to use your application server to format the results (and only return the results that will be substituted.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜