0
越來越節點我有一個HTML字符串jQuery的 - 從HTML字符串
$myhtml = '<div class="hello"><img src="/img/my/pic"/><p>this is a description">';
// the above line is made up it is actually much more complex and pulled in via ajax but you get the idea.
$parsedHtml = jQuery.parseHTML($myhtml).
我如何拔出各個節點和屬性?具體如何獲取圖片標籤的src屬性?
你要買什麼?你可以在解析對象上使用任何jQuery方法,所以我不確定你在這裏期待什麼?! –
專門查找src屬性。 – LeBlaireau