我想使用href = Images / pin_icon_red_unit.png解析查找内容。
var myParse = $('svg').html()
innerSearch = myParse.find( "image" ).attr("[href="Images/pin_icon_red_unit.png"]");
<svg id="OpenLayers.Layer.Vector_179_svgRoot" width="1556" height="556" viewBox="0 0 1556 556"><image id="OpenLayers.Geometry.Point_238" cx="778" cy="278" r="1" preserveAspectRatio="none" x="758" y="258" width="40" height="40" href="Images/pin_icon_red_unit.png" style="opacity: 1" fill="#000000" fill-opacity="1" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="none" pointer-events="visiblePainted"></image></svg>
最佳答案
$('svg image[href="Images/pin_icon_red_unit.png"]');
http://jsfiddle.net/bQLPt/
关于jquery - jQuery解析html(查找非标准元素),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9370614/