开发者

How to parse AJAX response without loading resources?

I load a bunch of HTML from the server containing img-tags. I need to parse this response (I need only a small part of it) and find a few particular tags.

Problem is, as soon as I throw the respons开发者_如何学Ce into jQuery to parse it, the browser loads all contained images. This is partly unnecessary (I don't need most of them), but the biggest problem is that they are loaded via HTTP in an SSL-environment.

Is there a way to parse an HTML-string without loading the contained images?


You should be able to parse the response inside the return function.

$.get(url, data, function(html)
{
    // Parse here
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜