日期:2014-05-16  浏览次数:20337 次

jQuery 查询xml文件节点
<PlateTrees>
    <Plate ID="1" Name="股票">
        <Plate ID="2" Name="A股"></Plate>
        <Plate ID="3" Name="港股"></Plate>
        <Plate ID="4" Name="美股"></Plate>
    </Plate>
    <Plate ID="5" Name="外汇">
        <Plate ID="6" Name="欧/美"></Plate>
        <Plate ID="7" Name="镑/美"></Plate>
        <Plate ID="8" Name="澳/美"></Plate>
        <Plate ID="9" Name="美/日"></Plate>
        <Plate ID="10" Name="美/加"></Plate>
        <Plate ID="11" Name="美/瑞"></Plate>
    </Plate>
</PlateTrees>


使用jQuery 怎样查询 ID为8的这个节点

------解决方案--------------------
$(xml).find('#8');