开发者

Found elements in a string

Say I have this script

$.get('test.html', function(data){ 
    //data
});

How can I find a div with a specif开发者_开发技巧ic class inside data??


Use data as the context argument to $(selector, context), like this:

$.get('test.html', function(data){ 
   $("div.someClass", data)
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜