简体   繁体   English

从Ajax加载的页面通过AJAX加载特定的html内容

[英]Load specific html content via AJAX from a page that is loaded via ajax

I want to make ajax call to load some specific div to my webpage. 我想进行ajax调用以将某些特定的div加载到我的网页上。 But the content I wanna load is itself loaded via ajax, so I can't get the full html content as I want. 但是我想加载的内容本身是通过ajax加载的,所以我无法获得所需的完整html内容。

function loadajax(){  
$.ajax({ url: 'http://callcom-com-au.myshopify.com/products/repair',
    crossDomain: true,
    method:'post',
    dataType: 'html', 
    success: function(response) { 
      $('#customer_reviews').html(jQuery(response).find('.spr-header').html());
      $('.spr-icon').css('color','#f3b41b');
    }
   });
  }
$('document').ready(function(){
setTimeout(loadajax,10000);

});

Is there any workaround. 有任何解决方法。 Any help would be appreciated. 任何帮助,将不胜感激。

Simply open this page http://callcom-com-au.myshopify.com/products/repair and firebug/google-chrome-web-tools etc. and click tab Network. 只需打开此页面http://callcom-com-au.myshopify.com/products/repair和firebug / google-chrome-web-tools等,然后点击标签网络。 Then grab direct link to content you want to get. 然后获取直接链接到您想要获得的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM