[英]Get all elements of an XML with a tag starting with
我有這個XML:
<computers>
<computer sid="1353323295303">
<description>TEST</description>
<match.country result="match" value="FR EU">
<match.country result="match" value="EU"></match.country>
</match.country>
</computer>
</computers>
如何選擇所有以“匹配”開頭的標簽。
謝謝
您可以使用filter
方法:
var $match = $('computers *').filter(function() {
return this.localName.indexOf('match') === 0
})
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.