weixin_33712881 2017-04-20 07:38 采纳率: 0%
浏览 47

Javascript Ajax替换网址

I want to get div(content_id) of any web site to my page(#mydiv). I tried to below codes.

$.ajax({
    url:'http://example.com',
    type:'GET',
    success: function(data){
       $('#mydiv').html($(data).find('#content_id').html());
    }
});

I have many error like this;

http://127.0.0.1/web/Content/icons/chart5.png (404 Not Found)
http://127.0.0.1/web/Content/icons/chart12.png (404 Not Found)
....

I tried replace('/web/', 'http://example.com/web/')

But it does not work. Can any body help me? Thanks...

  • 写回答

0条回答 默认 最新

    报告相同问题?