日期:2014-05-20  浏览次数:20848 次

jquery 省市二级联动 如何得到子节点值集合
xml结构如下:
  <province>
  <title>北京</title>
  <item>
  <city>东城</city>
  <city>西城</city>
  <city>崇文</city>
  <city>宣武</city>
  <city>朝阳</city>
  <city>丰台</city>
  <city>石景山</city>
  <city>海淀</city>
  <city>门头沟</city>
  <city>房山</city>
  <city>通州</city>
  <city>顺义</city>
  <city>昌平</city>
  <city>大兴</city>
  <city>平谷</city>
  <city>怀柔</city>
  <city>密云</city>
  <city>延庆</city>
  </item>
</province>
<province>
  <title>上海</title>
  <item>
  <city>黄浦</city>
  <city>卢湾</city>
  <city>徐汇</city>
  <city>长宁</city>
  <city>静安</city>
  <city>普陀</city>
  <city>闸北</city>
  <city>虹口</city>
  <city>杨浦</city>
  <city>闵行</city>
  <city>宝山</city>
  <city>嘉定</city>
  <city>浦东</city>
  <city>金山</city>
  <city>松江</city>
  <city>青浦</city>
  <city>南汇</city>
  <city>奉贤</city>
  <city>崇明</city>
  </item>
</province> <province>
  <title>北京</title>
  <item>
  <city>东城</city>
  <city>西城</city>
  <city>崇文</city>
  <city>宣武</city>
  <city>朝阳</city>
  <city>丰台</city>
  <city>石景山</city>
  <city>海淀</city>
  <city>门头沟</city>
  <city>房山</city>
  <city>通州</city>
  <city>顺义</city>
  <city>昌平</city>
  <city>大兴</city>
  <city>平谷</city>
  <city>怀柔</city>
  <city>密云</city>
  <city>延庆</city>
  </item>
</province>
<province>
  <title>上海</title>
  <item>
  <city>黄浦</city>
  <city>卢湾</city>
  <city>徐汇</city>
  <city>长宁</city>
  <city>静安</city>
  <city>普陀</city>
  <city>闸北</city>
  <city>虹口</city>
  <city>杨浦</city>
  <city>闵行</city>
  <city>宝山</city>
  <city>嘉定</city>
  <city>浦东</city>
  <city>金山</city>
  <city>松江</city>
  <city>青浦</city>
  <city>南汇</city>
  <city>奉贤</city>
  <city>崇明</city>
  </item>
</province>