0
如何選擇子標籤鍵的文本以'001'開頭的項目?jquery xml select
<root>
<item>
<key>001001</key>
<text>thanks</text>
</item>
<item>
<key>001002</key>
<text>very</text>
</item>
<item>
<key>002001</key>
<text>much</text>
</item>
</root>
$(xml).find("item>[filter string]").each(function()
{
alert(this);
});
你控制XML架構?提升孩子的屬性可能會更好('- ')。如果在'
- '之下還有更多的話,即使只是'鑰匙'。 –
2010-04-20 02:38:19
謝謝,這是一個很好的建議。 – 2010-04-20 03:20:55