鉴于我在 javascript 变量“数据”中有这个 html 字符串
<div class="packery-item">
<img class="rsImg" src="/media/VERSIONS/images/blog/2013/04/heart-watercolor1_featured_image.jpg" alt="Article illustration"/>
</div>
<div class="packery-item">
<img class="rsImg" src="/media/VERSIONS/images/blog/2013/04/planning_featured_image.jpg" alt="Article illustration"/>
</div>
<div class="packery-item">
<img src="/media/VERSIONS/images/galleries/2013/04/fashion_slideshow.jpg" alt="" />
</div>
当我运行$(data)
它返回类似:
[div.packery-item, text, div.packery-item, text, div.packery-item, text, div.packery-item, text, div.packery-item, text, div.packery-item, constructor: function, init: function, selector: "", jquery: "1.8.3", size: function…]
我希望它只返回一个 div.packery-item 列表。我做错了什么?