开发者

jQuery.get() div html data from external page

When we use jQuery load() we can define a DIV on the external page we want to load into our content.

Is there a similar way to get the html data开发者_开发技巧 from a specific DIV from an external page? Something like this?

var url = someurl;
var div = specificdiv
    $.get(someurl+' '+specificdiv , function(data) {
        $('#target_div').html(data);
    });


$('#target').load('http://example.com/someurl.html #specificdiv');
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜