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