0
4

2 回答 2

2

发布 xml 后的修订答案:

urlenclosure标签的一个属性

利用:

var url =  $(item).find("enclosure").attr('url')

演示:http: //jsfiddle.net/AV4ms/

于 2012-10-13T18:31:12.827 回答
0

If your xml feed tag is of the type like this

<link rel="enclosure" type="image/jpeg" length="2893" href="http://imgs.server.com/2010/06/imagethumb.jpg"/>

then you should use the Selector lk

var img = $(this).find('link[rel|="enclosure"]').attr('href');

in your code

Attribute Contains Prefix Selector

于 2013-06-10T22:47:57.130 回答