我正试图使用phpDOM来获取html中"thumbnailCarolusel"div中图像的src。但不知何故,loadHTML不包含这个元素。这与html中的javascript函数有关吗?如有任何建议或解决方法,我们将不胜感激。谢谢
示例html:http://www.crocs.com.sg/crocs-womens-cap-top-flat/12300,en_SG,pd.html?cid=6Z1&cgid=女鞋玛丽和平底鞋&intid=home14_cause_product
div:
<div class="thumbnailCarousel" data-jcarousel="true"><ul style="left: 0px; top: 0px;">
<ul style="left: 0px; top: 0px;">
<li>
<img src="http://images.crocs.com/is/image/Crocs/12300_6Z1_ALT100?&fmt=jpeg&qlt=85,1&op_sharpen=0&resMode=sharp2&op_usm=1,1,6,0&iccEmbed=0&printRes=72&wid=60&hei=72" alt="100">
</li>
<li>
<img src="http://images.crocs.com/is/image/Crocs/12300_6Z1_ALT100?&fmt=jpeg&qlt=85,1&op_sharpen=0&resMode=sharp2&op_usm=1,1,6,0&iccEmbed=0&printRes=72&wid=60&hei=72" alt="100">
</li>
</ul>
</div>
首先弹出的是问题中发布的标记无效,缺少</ul>
。