0

私はこの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>

「一致」で始まるすべてのタグを選択するにはどうすればよいですか。

ありがとうございました

4

1 に答える 1

1

メソッドを使用できますfilter

var $match = $('computers *').filter(function() {
    return this.localName.indexOf('match') === 0
})

http://jsfiddle.net/UmUkj/

于 2012-11-19T11:16:38.030 に答える