html實現 省——市——區三級聯動


轉發:https://www.cnblogs.com/dfys/p/dfys_html_province-city-area.html

<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
var provinceList = [ 
{name:'北京', cityList:[ 
{name:'市轄區', areaList:['東城區','西城區','崇文區','宣武區','朝陽區','豐台區','石景山區','海淀區','門頭溝區','房山區','通州區','順義區','昌平區','大興區','懷柔區','平谷區']}, 
{name:'', areaList:['密雲縣','延慶縣']} 
]}, 
{name:'上海', cityList:[ 
{name:'市轄區', areaList:['黃浦區','盧灣區','徐匯區','長寧區','靜安區','普陀區','閘北區','虹口區','楊浦區','閔行區','寶山區','嘉定區','浦東新區','金山區','松江區','青浦區','南匯區','奉賢區']}, 
{name:'', areaList:['崇明縣']} 
]}, 
{name:'天津', cityList:[ 
{name:'市轄區', areaList:['和平區','河東區','河西區','南開區','河北區','紅橋區','塘沽區','漢沽區','大港區','東麗區','西青區','津南區','北辰區','武清區','寶坻區']}, 
{name:'', areaList:['寧河縣','靜海縣','薊 縣']} 
]}, 
{name:'重慶', cityList:[ 
{name:'市轄區', areaList:['萬州區','涪陵區','渝中區','大渡口區','江北區','沙坪壩區','九龍坡區','南岸區','北碚區','萬盛區','雙橋區','渝北區','巴南區','黔江區','長壽區']}, 
{name:'', areaList:['綦江縣','潼南縣','銅梁縣','大足縣','榮昌縣','璧山縣','梁平縣','城口縣','豐都縣','墊江縣','武隆縣','忠 縣','開 縣','雲陽縣','奉節縣','巫山縣','巫溪縣','石柱土家族自治縣','秀山土家族苗族自治縣','酉陽土家族苗族自治縣','彭水苗族土家族自治縣']}, 
{name:'', areaList:['江津市','合川市','永川市','南川市']} 
]}, 
{name:'四川', cityList:[ 
{name:'成都市', areaList:['市轄區','錦江區','青羊區','金牛區','武侯區','成華區','龍泉驛區','青白江區','新都區','溫江縣','金堂縣','雙流縣','郫 縣','大邑縣','蒲江縣','新津縣','都江堰市','彭州市','邛崍市','崇州市']}, 
{name:'自貢市', areaList:['市轄區','自流井區','貢井區','大安區','沿灘區','榮 縣','富順縣']}, 
{name:'攀枝花市', areaList:['市轄區','東 區','西 區','仁和區','米易縣','鹽邊縣']}, 
{name:'瀘州市', areaList:['市轄區','江陽區','納溪區','龍馬潭區','瀘 縣','合江縣','敘永縣','古藺縣']}, 
{name:'德陽市', areaList:['市轄區','旌陽區','中江縣','羅江縣','廣漢市','什邡市','綿竹市']}, 
{name:'綿陽市', areaList:['市轄區','涪城區','游仙區','三台縣','鹽亭縣','安 縣','梓潼縣','北川羌族自治縣','平武縣','江油市']}, 
{name:'廣元市', areaList:['市轄區','市中區','元壩區','朝天區','旺蒼縣','青川縣','劍閣縣','蒼溪縣']}, 
{name:'遂寧市', areaList:['市轄區','船山區','安居區','蓬溪縣','射洪縣','大英縣']}, 
{name:'內江市', areaList:['市轄區','市中區','東興區','威遠縣','資中縣','隆昌縣']}, 
{name:'樂山市', areaList:['市轄區','市中區','沙灣區','五通橋區','金口河區','犍為縣','井研縣','夾江縣','沐川縣','峨邊彝族自治縣','馬邊彝族自治縣','峨眉山市']}, 
{name:'南充市', areaList:['市轄區','順慶區','高坪區','嘉陵區','南部縣','營山縣','蓬安縣','儀隴縣','西充縣','閬中市']}, 
{name:'眉山市', areaList:['市轄區','東坡區','仁壽縣','彭山縣','洪雅縣','丹棱縣','青神縣']}, 
{name:'宜賓市', areaList:['市轄區','翠屏區','宜賓縣','南溪縣','江安縣','長寧縣','高 縣','珙 縣','筠連縣','興文縣','屏山縣']}, 
{name:'廣安市', areaList:['市轄區','廣安區','岳池縣','武勝縣','鄰水縣','華瑩市']}, 
{name:'達州市', areaList:['市轄區','通川區','達 縣','宣漢縣','開江縣','大竹縣','渠 縣','萬源市']}, 
{name:'雅安市', areaList:['市轄區','雨城區','名山縣','滎經縣','漢源縣','石棉縣','天全縣','蘆山縣','寶興縣']}, 
{name:'巴中市', areaList:['市轄區','巴州區','通江縣','南江縣','平昌縣']}, 
{name:'資陽市', areaList:['市轄區','雁江區','安岳縣','樂至縣','簡陽市']}, 
{name:'阿壩藏族羌族自治州', areaList:['汶川縣','理 縣','茂 縣','松潘縣','九寨溝縣','金川縣','小金縣','黑水縣','馬爾康縣','壤塘縣','阿壩縣','若爾蓋縣','紅原縣']}, 
{name:'甘孜藏族自治州', areaList:['康定縣','瀘定縣','丹巴縣','九龍縣','雅江縣','道孚縣','爐霍縣','甘孜縣','新龍縣','德格縣','白玉縣','石渠縣','色達縣','理塘縣','巴塘縣','鄉城縣','稻城縣','得榮縣']}, 
{name:'涼山彝族自治州', areaList:['西昌市','木里藏族自治縣','鹽源縣','德昌縣','會理縣','會東縣','寧南縣','普格縣','布拖縣','金陽縣','昭覺縣','喜德縣','冕寧縣','越西縣','甘洛縣','美姑縣','雷波縣']} 
]}, 
{name:'貴州', cityList:[ 
{name:'貴陽市', areaList:['市轄區','南明區','雲岩區','花溪區','烏當區','白雲區','小河區','開陽縣','息烽縣','修文縣','清鎮市']}, 
{name:'六盤水市', areaList:['鍾山區','六枝特區','水城縣','盤 縣']}, 
{name:'遵義市', areaList:['市轄區','紅花崗區','匯川區','遵義縣','桐梓縣','綏陽縣','正安縣','道真仡佬族苗族自治縣','務川仡佬族苗族自治縣','鳳岡縣','湄潭縣','余慶縣','習水縣','赤水市','仁懷市']}, 
{name:'安順市', areaList:['市轄區','西秀區','平壩縣','普定縣','鎮寧布依族苗族自治縣','關嶺布依族苗族自治縣','紫雲苗族布依族自治縣']}, 
{name:'銅仁地區', areaList:['銅仁市','江口縣','玉屏侗族自治縣','石阡縣','思南縣','印江土家族苗族自治縣','德江縣','沿河土家族自治縣','松桃苗族自治縣','萬山特區']}, 
{name:'黔西南布依族苗族自治州', areaList:['興義市','興仁縣','普安縣','晴隆縣','貞豐縣','望謨縣','冊亨縣','安龍縣']}, 
{name:'畢節地區', areaList:['畢節市','大方縣','黔西縣','金沙縣','織金縣','納雍縣','威寧彝族回族苗族自治縣','赫章縣']}, 
{name:'黔東南苗族侗族自治州', areaList:['凱里市','黃平縣','施秉縣','三穗縣','鎮遠縣','岑鞏縣','天柱縣','錦屏縣','劍河縣','台江縣','黎平縣','榕江縣','從江縣','雷山縣','麻江縣','丹寨縣']}, 
{name:'黔南布依族苗族自治州', areaList:['都勻市','福泉市','荔波縣','貴定縣','瓮安縣','獨山縣','平塘縣','羅甸縣','長順縣','龍里縣','惠水縣','三都水族自治縣']} 
]}, 
{name:'雲南', cityList:[ 
{name:'昆明市', areaList:['市轄區','五華區','盤龍區','官渡區','西山區','東川區','呈貢縣','晉寧縣','富民縣','宜良縣','石林彝族自治縣','嵩明縣','祿勸彝族苗族自治縣','尋甸回族彝族自治縣','安寧市']}, 
{name:'曲靖市', areaList:['市轄區','麒麟區','馬龍縣','陸良縣','師宗縣','羅平縣','富源縣','會澤縣','沾益縣','宣威市']}, 
{name:'玉溪市', areaList:['市轄區','紅塔區','江川縣','澄江縣','通海縣','華寧縣','易門縣','峨山彝族自治縣','新平彝族傣族自治縣','元江哈尼族彝族傣族自治縣']}, 
{name:'保山市', areaList:['市轄區','隆陽區','施甸縣','騰沖縣','龍陵縣','昌寧縣']}, 
{name:'昭通市', areaList:['市轄區','昭陽區','魯甸縣','巧家縣','鹽津縣','大關縣','永善縣','綏江縣','鎮雄縣','彝良縣','威信縣','水富縣']}, 
{name:'麗江市', areaList:['市轄區','古城區','玉龍納西族自治縣','永勝縣','華坪縣','寧蒗彝族自治縣']}, 
{name:'思茅市', areaList:['市轄區','翠雲區','普洱哈尼族彝族自治縣','墨江哈尼族自治縣','景東彝族自治縣','景谷傣族彝族自治縣','鎮沅彝族哈尼族拉祜族自治縣','江城哈尼族彝族自治縣','孟連傣族拉祜族佤族自治縣','瀾滄拉祜族自治縣','西盟佤族自治縣']}, 
{name:'臨滄市', areaList:['市轄區','臨翔區','鳳慶縣','雲 縣','永德縣','鎮康縣','雙江拉祜族佤族布朗族傣族自治縣','耿馬傣族佤族自治縣','滄源佤族自治縣']}, 
{name:'楚雄彝族自治州', areaList:['楚雄市','雙柏縣','牟定縣','南華縣','姚安縣','大姚縣','永仁縣','元謀縣','武定縣','祿豐縣']}, 
{name:'紅河哈尼族彝族自治州', areaList:['個舊市','開遠市','蒙自縣','屏邊苗族自治縣','建水縣','石屏縣','彌勒縣','瀘西縣','元陽縣','紅河縣','金平苗族瑤族傣族自治縣','綠春縣','河口瑤族自治縣']}, 
{name:'文山壯族苗族自治州', areaList:['文山縣','硯山縣','西疇縣','麻栗坡縣','馬關縣','丘北縣','廣南縣','富寧縣']}, 
{name:'西雙版納傣族自治州', areaList:['景洪市','勐海縣','勐臘縣']}, 
{name:'大理白族自治州', areaList:['大理市','漾濞彝族自治縣','祥雲縣','賓川縣','彌渡縣','南澗彝族自治縣','巍山彝族回族自治縣','永平縣','雲龍縣','洱源縣','劍川縣','鶴慶縣']}, 
{name:'德宏傣族景頗族自治州', areaList:['瑞麗市','潞西市','梁河縣','盈江縣','隴川縣']}, 
{name:'怒江傈僳族自治州', areaList:['瀘水縣','福貢縣','貢山獨龍族怒族自治縣','蘭坪白族普米族自治縣']}, 
{name:'迪慶藏族自治州', areaList:['香格里拉縣','德欽縣','維西傈僳族自治縣']} 
]}, 
{name:'西藏', cityList:[ 
{name:'拉薩市', areaList:['市轄區','城關區','林周縣','當雄縣','尼木縣','曲水縣','堆龍德慶縣','達孜縣','墨竹工卡縣']}, 
{name:'昌都地區', areaList:['昌都縣','江達縣','貢覺縣','類烏齊縣','丁青縣','察雅縣','八宿縣','左貢縣','芒康縣','洛隆縣','邊壩縣']}, 
{name:'山南地區', areaList:['乃東縣','扎囊縣','貢嘎縣','桑日縣','瓊結縣','曲松縣','措美縣','洛扎縣','加查縣','隆子縣','錯那縣','浪卡子縣']}, 
{name:'日喀則地區', areaList:['日喀則市','南木林縣','江孜縣','定日縣','薩迦縣','拉孜縣','昂仁縣','謝通門縣','白朗縣','仁布縣','康馬縣','定結縣','仲巴縣','亞東縣','吉隆縣','聶拉木縣','薩嘎縣','崗巴縣']}, 
{name:'那曲地區', areaList:['那曲縣','嘉黎縣','比如縣','聶榮縣','安多縣','申扎縣','索 縣','班戈縣','巴青縣','尼瑪縣']}, 
{name:'阿里地區', areaList:['普蘭縣','札達縣','噶爾縣','日土縣','革吉縣','改則縣','措勤縣']}, 
{name:'林芝地區', areaList:['林芝縣','工布江達縣','米林縣','墨脫縣','波密縣','察隅縣','朗 縣']} 
]}, 
{name:'河南', cityList:[ 
{name:'鄭州市', areaList:['市轄區','中原區','二七區','管城回族區','金水區','上街區','邙山區','中牟縣','鞏義市','滎陽市','新密市','新鄭市','登封市']}, 
{name:'開封市', areaList:['市轄區','龍亭區','順河回族區','鼓樓區','南關區','郊 區','杞 縣','通許縣','尉氏縣','開封縣','蘭考縣']}, 
{name:'洛陽市', areaList:['市轄區','老城區','西工區','廛河回族區','澗西區','吉利區','洛龍區','孟津縣','新安縣','欒川縣','嵩 縣','汝陽縣','宜陽縣','洛寧縣','伊川縣','偃師市']}, 
{name:'平頂山市', areaList:['市轄區','新華區','衛東區','石龍區','湛河區','寶豐縣','葉 縣','魯山縣','郟 縣','舞鋼市','汝州市']}, 
{name:'安陽市', areaList:['市轄區','文峰區','北關區','殷都區','龍安區','安陽縣','湯陰縣','滑 縣','內黃縣','林州市']}, 
{name:'鶴壁市', areaList:['市轄區','鶴山區','山城區','淇濱區','浚 縣','淇 縣']}, 
{name:'新鄉市', areaList:['市轄區','紅旗區','衛濱區','鳳泉區','牧野區','新鄉縣','獲嘉縣','原陽縣','延津縣','封丘縣','長垣縣','衛輝市','輝縣市']}, 
{name:'焦作市', areaList:['市轄區','解放區','中站區','馬村區','山陽區','修武縣','博愛縣','武陟縣','溫 縣','濟源市','沁陽市','孟州市']}, 
{name:'濮陽市', areaList:['市轄區','華龍區','清豐縣','南樂縣','范 縣','台前縣','濮陽縣']}, 
{name:'許昌市', areaList:['市轄區','魏都區','許昌縣','鄢陵縣','襄城縣','禹州市','長葛市']}, 
{name:'漯河市', areaList:['市轄區','源匯區','郾城區','召陵區','舞陽縣','臨潁縣']}, 
{name:'三門峽市', areaList:['市轄區','湖濱區','澠池縣','陝 縣','盧氏縣','義馬市','靈寶市']}, 
{name:'南陽市', areaList:['市轄區','宛城區','卧龍區','南召縣','方城縣','西峽縣','鎮平縣','內鄉縣','淅川縣','社旗縣','唐河縣','新野縣','桐柏縣','鄧州市']}, 
{name:'商丘市', areaList:['市轄區','梁園區','睢陽區','民權縣','睢 縣','寧陵縣','柘城縣','虞城縣','夏邑縣','永城市']}, 
{name:'信陽市', areaList:['市轄區','師河區','平橋區','羅山縣','光山縣','新 縣','商城縣','固始縣','潢川縣','淮濱縣','息 縣']}, 
{name:'周口市', areaList:['市轄區','川匯區','扶溝縣','西華縣','商水縣','沈丘縣','鄲城縣','淮陽縣','太康縣','鹿邑縣','項城市']}, 
{name:'駐馬店市', areaList:['市轄區','驛城區','西平縣','上蔡縣','平輿縣','正陽縣','確山縣','泌陽縣','汝南縣','遂平縣','新蔡縣']} 
]}, 
{name:'湖北', cityList:[ 
{name:'武漢市', areaList:['市轄區','江岸區','江漢區','喬口區','漢陽區','武昌區','青山區','洪山區','東西湖區','漢南區','蔡甸區','江夏區','黃陂區','新洲區']}, 
{name:'黃石市', areaList:['市轄區','黃石港區','西塞山區','下陸區','鐵山區','陽新縣','大冶市']}, 
{name:'十堰市', areaList:['市轄區','茅箭區','張灣區','鄖 縣','鄖西縣','竹山縣','竹溪縣','房 縣','丹江口市']}, 
{name:'宜昌市', areaList:['市轄區','西陵區','伍家崗區','點軍區','猇亭區','夷陵區','遠安縣','興山縣','秭歸縣','長陽土家族自治縣','五峰土家族自治縣','宜都市','當陽市','枝江市']}, 
{name:'襄樊市', areaList:['市轄區','襄城區','樊城區','襄陽區','南漳縣','谷城縣','保康縣','老河口市','棗陽市','宜城市']}, 
{name:'鄂州市', areaList:['市轄區','梁子湖區','華容區','鄂城區']}, 
{name:'荊門市', areaList:['市轄區','東寶區','掇刀區','京山縣','沙洋縣','鍾祥市']}, 
{name:'孝感市', areaList:['市轄區','孝南區','孝昌縣','大悟縣','雲夢縣','應城市','安陸市','漢川市']}, 
{name:'荊州市', areaList:['市轄區','沙市區','荊州區','公安縣','監利縣','江陵縣','石首市','洪湖市','松滋市']}, 
{name:'黃岡市', areaList:['市轄區','黃州區','團風縣','紅安縣','羅田縣','英山縣','浠水縣','蘄春縣','黃梅縣','麻城市','武穴市']}, 
{name:'咸寧市', areaList:['市轄區','咸安區','嘉魚縣','通城縣','崇陽縣','通山縣','赤壁市']}, 
{name:'隨州市', areaList:['市轄區','曾都區','廣水市']}, 
{name:'恩施土家族苗族自治州', areaList:['恩施市','利川市','建始縣','巴東縣','宣恩縣','咸豐縣','來鳳縣','鶴峰縣']}, 
{name:'省直轄行政單位', areaList:['仙桃市','潛江市','天門市','神農架林區']} 
]}, 
{name:'湖南', cityList:[ 
{name:'長沙市', areaList:['市轄區','芙蓉區','天心區','岳麓區','開福區','雨花區','長沙縣','望城縣','寧鄉縣','瀏陽市']}, 
{name:'株洲市', areaList:['市轄區','荷塘區','蘆淞區','石峰區','天元區','株洲縣','攸 縣','茶陵縣','炎陵縣','醴陵市']}, 
{name:'湘潭市', areaList:['市轄區','雨湖區','岳塘區','湘潭縣','湘鄉市','韶山市']}, 
{name:'衡陽市', areaList:['市轄區','珠暉區','雁峰區','石鼓區','蒸湘區','南岳區','衡陽縣','衡南縣','衡山縣','衡東縣','祁東縣','耒陽市','常寧市']}, 
{name:'邵陽市', areaList:['市轄區','雙清區','大祥區','北塔區','邵東縣','新邵縣','邵陽縣','隆回縣','洞口縣','綏寧縣','新寧縣','城步苗族自治縣','武岡市']}, 
{name:'岳陽市', areaList:['市轄區','岳陽樓區','雲溪區','君山區','岳陽縣','華容縣','湘陰縣','平江縣','汨羅市','臨湘市']}, 
{name:'常德市', areaList:['市轄區','武陵區','鼎城區','安鄉縣','漢壽縣','澧 縣','臨澧縣','桃源縣','石門縣','津市市']}, 
{name:'張家界市', areaList:['市轄區','永定區','武陵源區','慈利縣','桑植縣']}, 
{name:'益陽市', areaList:['市轄區','資陽區','赫山區','南 縣','桃江縣','安化縣','沅江市']}, 
{name:'郴州市', areaList:['市轄區','北湖區','蘇仙區','桂陽縣','宜章縣','永興縣','嘉禾縣','臨武縣','汝城縣','桂東縣','安仁縣','資興市']}, 
{name:'永州市', areaList:['市轄區','芝山區','冷水灘區','祁陽縣','東安縣','雙牌縣','道 縣','江永縣','寧遠縣','藍山縣','新田縣','江華瑤族自治縣']}, 
{name:'懷化市', areaList:['市轄區','鶴城區','中方縣','沅陵縣','辰溪縣','漵浦縣','會同縣','麻陽苗族自治縣','新晃侗族自治縣','芷江侗族自治縣','靖州苗族侗族自治縣','通道侗族自治縣','洪江市']}, 
{name:'婁底市', areaList:['市轄區','婁星區','雙峰縣','新化縣','冷水江市','漣源市']}, 
{name:'湘西土家族苗族自治州', areaList:['吉首市','瀘溪縣','鳳凰縣','花垣縣','保靖縣','古丈縣','永順縣','龍山縣']} 
]}, 
{name:'廣東', cityList:[ 
{name:'廣州市', areaList:['市轄區','東山區','荔灣區','越秀區','海珠區','天河區','芳村區','白雲區','黃埔區','番禺區','花都區','增城市','從化市']}, 
{name:'韶關市', areaList:['市轄區','武江區','湞江區','曲江區','始興縣','仁化縣','翁源縣','乳源瑤族自治縣','新豐縣','樂昌市','南雄市']}, 
{name:'深圳市', areaList:['市轄區','羅湖區','福田區','南山區','寶安區','龍崗區','鹽田區']}, 
{name:'珠海市', areaList:['市轄區','香洲區','斗門區','金灣區']}, 
{name:'汕頭市', areaList:['市轄區','龍湖區','金平區','濠江區','潮陽區','潮南區','澄海區','南澳縣']}, 
{name:'佛山市', areaList:['市轄區','禪城區','南海區','順德區','三水區','高明區']}, 
{name:'江門市', areaList:['市轄區','蓬江區','江海區','新會區','台山市','開平市','鶴山市','恩平市']}, 
{name:'湛江市', areaList:['市轄區','赤坎區','霞山區','坡頭區','麻章區','遂溪縣','徐聞縣','廉江市','雷州市','吳川市']}, 
{name:'茂名市', areaList:['市轄區','茂南區','茂港區','電白縣','高州市','化州市','信宜市']}, 
{name:'肇慶市', areaList:['市轄區','端州區','鼎湖區','廣寧縣','懷集縣','封開縣','德慶縣','高要市','四會市']}, 
{name:'惠州市', areaList:['市轄區','惠城區','惠陽區','博羅縣','惠東縣','龍門縣']}, 
{name:'梅州市', areaList:['市轄區','梅江區','梅 縣','大埔縣','豐順縣','五華縣','平遠縣','蕉嶺縣','興寧市']}, 
{name:'汕尾市', areaList:['市轄區','城 區','海豐縣','陸河縣','陸豐市']}, 
{name:'河源市', areaList:['市轄區','源城區','紫金縣','龍川縣','連平縣','和平縣','東源縣']}, 
{name:'陽江市', areaList:['市轄區','江城區','陽西縣','陽東縣','陽春市']}, 
{name:'清遠市', areaList:['市轄區','清城區','佛岡縣','陽山縣','連山壯族瑤族自治縣','連南瑤族自治縣','清新縣','英德市','連州市']}, 
{name:'東莞市', areaList:['東莞市']}, 
{name:'中山市', areaList:['中山市']}, 
{name:'潮州市', areaList:['市轄區','湘橋區','潮安縣','饒平縣']}, 
{name:'揭陽市', areaList:['市轄區','榕城區','揭東縣','揭西縣','惠來縣','普寧市']}, 
{name:'雲浮市', areaList:['市轄區','雲城區','新興縣','郁南縣','雲安縣','羅定市']} 
]}, 
{name:'廣西', cityList:[ 
{name:'南寧市', areaList:['市轄區','興寧區','青秀區','江南區','西鄉塘區','良慶區','邕寧區','武鳴縣','隆安縣','馬山縣','上林縣','賓陽縣','橫 縣']}, 
{name:'柳州市', areaList:['市轄區','城中區','魚峰區','柳南區','柳北區','柳江縣','柳城縣','鹿寨縣','融安縣','融水苗族自治縣','三江侗族自治縣']}, 
{name:'桂林市', areaList:['市轄區','秀峰區','疊彩區','象山區','七星區','雁山區','陽朔縣','臨桂縣','靈川縣','全州縣','興安縣','永福縣','灌陽縣','龍勝各族自治縣','資源縣','平樂縣','荔蒲縣','恭城瑤族自治縣']}, 
{name:'梧州市', areaList:['市轄區','萬秀區','蝶山區','長洲區','蒼梧縣','藤 縣','蒙山縣','岑溪市']}, 
{name:'北海市', areaList:['市轄區','海城區','銀海區','鐵山港區','合浦縣']}, 
{name:'防城港市', areaList:['市轄區','港口區','防城區','上思縣','東興市']}, 
{name:'欽州市', areaList:['市轄區','欽南區','欽北區','靈山縣','浦北縣']}, 
{name:'貴港市', areaList:['市轄區','港北區','港南區','覃塘區','平南縣','桂平市']}, 
{name:'玉林市', areaList:['市轄區','玉州區','容 縣','陸川縣','博白縣','興業縣','北流市']}, 
{name:'百色市', areaList:['市轄區','右江區','田陽縣','田東縣','平果縣','德保縣','靖西縣','那坡縣','凌雲縣','樂業縣','田林縣','西林縣','隆林各族自治縣']}, 
{name:'賀州市', areaList:['市轄區','八步區','昭平縣','鍾山縣','富川瑤族自治縣']}, 
{name:'河池市', areaList:['市轄區','金城江區','南丹縣','天峨縣','鳳山縣','東蘭縣','羅城仫佬族自治縣','環江毛南族自治縣','巴馬瑤族自治縣','都安瑤族自治縣','大化瑤族自治縣','宜州市']}, 
{name:'來賓市', areaList:['市轄區','興賓區','忻城縣','象州縣','武宣縣','金秀瑤族自治縣','合山市']}, 
{name:'崇左市', areaList:['市轄區','江洲區','扶綏縣','寧明縣','龍州縣','大新縣','天等縣','憑祥市']} 
]}, 
{name:'陝西', cityList:[ 
{name:'西安市', areaList:['市轄區','新城區','碑林區','蓮湖區','灞橋區','未央區','雁塔區','閻良區','臨潼區','長安區','藍田縣','周至縣','戶 縣','高陵縣']}, 
{name:'銅川市', areaList:['市轄區','王益區','印台區','耀州區','宜君縣']}, 
{name:'寶雞市', areaList:['市轄區','渭濱區','金台區','陳倉區','鳳翔縣','岐山縣','扶風縣','眉 縣','隴 縣','千陽縣','麟游縣','鳳 縣','太白縣']}, 
{name:'咸陽市', areaList:['市轄區','秦都區','楊凌區','渭城區','三原縣','涇陽縣','乾 縣','禮泉縣','永壽縣','彬 縣','長武縣','旬邑縣','淳化縣','武功縣','興平市']}, 
{name:'渭南市', areaList:['市轄區','臨渭區','華 縣','潼關縣','大荔縣','合陽縣','澄城縣','蒲城縣','白水縣','富平縣','韓城市','華陰市']}, 
{name:'延安市', areaList:['市轄區','寶塔區','延長縣','延川縣','子長縣','安塞縣','志丹縣','吳旗縣','甘泉縣','富 縣','洛川縣','宜川縣','黃龍縣','黃陵縣']}, 
{name:'漢中市', areaList:['市轄區','漢台區','南鄭縣','城固縣','洋 縣','西鄉縣','勉 縣','寧強縣','略陽縣','鎮巴縣','留壩縣','佛坪縣']}, 
{name:'榆林市', areaList:['市轄區','榆陽區','神木縣','府谷縣','橫山縣','靖邊縣','定邊縣','綏德縣','米脂縣','佳 縣','吳堡縣','清澗縣','子洲縣']}, 
{name:'安康市', areaList:['市轄區','漢濱區','漢陰縣','石泉縣','寧陝縣','紫陽縣','嵐皋縣','平利縣','鎮坪縣','旬陽縣','白河縣']}, 
{name:'商洛市', areaList:['市轄區','商州區','洛南縣','丹鳳縣','商南縣','山陽縣','鎮安縣','柞水縣']} 
]}, 
{name:'甘肅', cityList:[ 
{name:'蘭州市', areaList:['市轄區','城關區','七里河區','西固區','安寧區','紅古區','永登縣','皋蘭縣','榆中縣']}, 
{name:'嘉峪關市', areaList:['市轄區']}, 
{name:'金昌市', areaList:['市轄區','金川區','永昌縣']}, 
{name:'白銀市', areaList:['市轄區','白銀區','平川區','靖遠縣','會寧縣','景泰縣']}, 
{name:'天水市', areaList:['市轄區','秦城區','北道區','清水縣','秦安縣','甘谷縣','武山縣','張家川回族自治縣']}, 
{name:'武威市', areaList:['市轄區','涼州區','民勤縣','古浪縣','天祝藏族自治縣']}, 
{name:'張掖市', areaList:['市轄區','甘州區','肅南裕固族自治縣','民樂縣','臨澤縣','高台縣','山丹縣']}, 
{name:'平涼市', areaList:['市轄區','崆峒區','涇川縣','靈台縣','崇信縣','華亭縣','庄浪縣','靜寧縣']}, 
{name:'酒泉市', areaList:['市轄區','肅州區','金塔縣','安西縣','肅北蒙古族自治縣','阿克塞哈薩克族自治縣','玉門市','敦煌市']}, 
{name:'慶陽市', areaList:['市轄區','西峰區','慶城縣','環 縣','華池縣','合水縣','正寧縣','寧 縣','鎮原縣']}, 
{name:'定西市', areaList:['市轄區','安定區','通渭縣','隴西縣','渭源縣','臨洮縣','漳 縣','岷 縣']}, 
{name:'隴南市', areaList:['市轄區','武都區','成 縣','文 縣','宕昌縣','康 縣','西和縣','禮 縣','徽 縣','兩當縣']}, 
{name:'臨夏回族自治州', areaList:['臨夏市','臨夏縣','康樂縣','永靖縣','廣河縣','和政縣','東鄉族自治縣','積石山保安族東鄉族撒拉族自治縣']}, 
{name:'甘南藏族自治州', areaList:['合作市','臨潭縣','卓尼縣','舟曲縣','迭部縣','瑪曲縣','碌曲縣','夏河縣']} 
]}, 
{name:'青海', cityList:[ 
{name:'西寧市', areaList:['市轄區','城東區','城中區','城西區','城北區','大通回族土族自治縣','湟中縣','湟源縣']}, 
{name:'海東地區', areaList:['平安縣','民和回族土族自治縣','樂都縣','互助土族自治縣','化隆回族自治縣','循化撒拉族自治縣']}, 
{name:'海北藏族自治州', areaList:['門源回族自治縣','祁連縣','海晏縣','剛察縣']}, 
{name:'黃南藏族自治州', areaList:['同仁縣','尖扎縣','澤庫縣','河南蒙古族自治縣']}, 
{name:'海南藏族自治州', areaList:['共和縣','同德縣','貴德縣','興海縣','貴南縣']}, 
{name:'果洛藏族自治州', areaList:['瑪沁縣','班瑪縣','甘德縣','達日縣','久治縣','瑪多縣']}, 
{name:'玉樹藏族自治州', areaList:['玉樹縣','雜多縣','稱多縣','治多縣','囊謙縣','曲麻萊縣']}, 
{name:'海西蒙古族藏族自治州', areaList:['格爾木市','德令哈市','烏蘭縣','都蘭縣','天峻縣']} 
]}, 
{name:'寧夏', cityList:[ 
{name:'銀川市', areaList:['市轄區','興慶區','西夏區','金鳳區','永寧縣','賀蘭縣','靈武市']}, 
{name:'石嘴山市', areaList:['市轄區','大武口區','惠農區','平羅縣']}, 
{name:'吳忠市', areaList:['市轄區','利通區','鹽池縣','同心縣','青銅峽市']}, 
{name:'固原市', areaList:['市轄區','原州區','西吉縣','隆德縣','涇源縣','彭陽縣','海原縣']}, 
{name:'中衛市', areaList:['市轄區','沙坡頭區','中寧縣']} 
]}, 
{name:'新疆', cityList:[ 
{name:'烏魯木齊市', areaList:['市轄區','天山區','沙依巴克區','新市區','水磨溝區','頭屯河區','達坂城區','東山區','烏魯木齊縣']}, 
{name:'克拉瑪依市', areaList:['市轄區','獨山子區','克拉瑪依區','白鹼灘區','烏爾禾區']}, 
{name:'吐魯番地區', areaList:['吐魯番市','鄯善縣','托克遜縣']}, 
{name:'哈密地區', areaList:['哈密市','巴里坤哈薩克自治縣','伊吾縣']}, 
{name:'昌吉回族自治州', areaList:['昌吉市','阜康市','米泉市','呼圖壁縣','瑪納斯縣','奇台縣','吉木薩爾縣','木壘哈薩克自治縣']}, 
{name:'博爾塔拉蒙古自治州', areaList:['博樂市','精河縣','溫泉縣']}, 
{name:'巴音郭楞蒙古自治州', areaList:['庫爾勒市','輪台縣','尉犁縣','若羌縣','且末縣','焉耆回族自治縣','和靜縣','和碩縣','博湖縣']}, 
{name:'阿克蘇地區', areaList:['阿克蘇市','溫宿縣','庫車縣','沙雅縣','新和縣','拜城縣','烏什縣','阿瓦提縣','柯坪縣']}, 
{name:'克孜勒蘇柯爾克孜自治州', areaList:['阿圖什市','阿克陶縣','阿合奇縣','烏恰縣']}, 
{name:'喀什地區', areaList:['喀什市','疏附縣','疏勒縣','英吉沙縣','澤普縣','莎車縣','葉城縣','麥蓋提縣','岳普湖縣','伽師縣','巴楚縣','塔什庫爾干塔吉克自治縣']}, 
{name:'和田地區', areaList:['和田市','和田縣','墨玉縣','皮山縣','洛浦縣','策勒縣','於田縣','民豐縣']}, 
{name:'伊犁哈薩克自治州', areaList:['伊寧市','奎屯市','伊寧縣','察布查爾錫伯自治縣','霍城縣','鞏留縣','新源縣','昭蘇縣','特克斯縣','尼勒克縣']}, 
{name:'塔城地區', areaList:['塔城市','烏蘇市','額敏縣','沙灣縣','托里縣','裕民縣','和布克賽爾蒙古自治縣']}, 
{name:'阿勒泰地區', areaList:['阿勒泰市','布爾津縣','富蘊縣','福海縣','哈巴河縣','青河縣','吉木乃縣']}, 
{name:'省直轄行政單位', areaList:['石河子市','阿拉爾市','圖木舒克市','五家渠市']} 
]}, 
{name:'河北', cityList:[ 
{name:'石家庄市', areaList:['市轄區','長安區','橋東區','橋西區','新華區','井陘礦區','裕華區','井陘縣','正定縣','欒城縣','行唐縣','靈壽縣','高邑縣','深澤縣','贊皇縣','無極縣','平山縣','元氏縣','趙 縣','辛集市','藁城市','晉州市','新樂市','鹿泉市']}, 
{name:'唐山市', areaList:['市轄區','路南區','路北區','古冶區','開平區','豐南區','豐潤區','灤 縣','灤南縣','樂亭縣','遷西縣','玉田縣','唐海縣','遵化市','遷安市']}, 
{name:'秦皇島市', areaList:['市轄區','海港區','山海關區','北戴河區','青龍滿族自治縣','昌黎縣','撫寧縣','盧龍縣']}, 
{name:'邯鄲市', areaList:['市轄區','邯山區','叢台區','復興區','峰峰礦區','邯鄲縣','臨漳縣','成安縣','大名縣','涉 縣','磁 縣','肥鄉縣','永年縣','邱 縣','雞澤縣','廣平縣','館陶縣','魏 縣','曲周縣','武安市']}, 
{name:'邢台市', areaList:['市轄區','橋東區','橋西區','邢台縣','臨城縣','內丘縣','柏鄉縣','隆堯縣','任 縣','南和縣','寧晉縣','巨鹿縣','新河縣','廣宗縣','平鄉縣','威 縣','清河縣','臨西縣','南宮市','沙河市']}, 
{name:'保定市', areaList:['市轄區','新市區','北市區','南市區','滿城縣','清苑縣','淶水縣','阜平縣','徐水縣','定興縣','唐 縣','高陽縣','容城縣','淶源縣','望都縣','安新縣','易 縣','曲陽縣','蠡 縣','順平縣','博野縣','雄 縣','涿州市','定州市','安國市','高碑店市']}, 
{name:'張家口市', areaList:['市轄區','橋東區','橋西區','宣化區','下花園區','宣化縣','張北縣','康保縣','沽源縣','尚義縣','蔚 縣','陽原縣','懷安縣','萬全縣','懷來縣','涿鹿縣','赤城縣','崇禮縣']}, 
{name:'承德市', areaList:['市轄區','雙橋區','雙灤區','鷹手營子礦區','承德縣','興隆縣','平泉縣','灤平縣','隆化縣','豐寧滿族自治縣','寬城滿族自治縣','圍場滿族蒙古族自治縣']}, 
{name:'滄州市', areaList:['市轄區','新華區','運河區','滄 縣','青 縣','東光縣','海興縣','鹽山縣','肅寧縣','南皮縣','吳橋縣','獻 縣','孟村回族自治縣','泊頭市','任丘市','黃驊市','河間市']}, 
{name:'廊坊市', areaList:['市轄區','安次區','廣陽區','固安縣','永清縣','香河縣','大城縣','文安縣','大廠回族自治縣','霸州市','三河市']}, 
{name:'衡水市', areaList:['市轄區','桃城區','棗強縣','武邑縣','武強縣','饒陽縣','安平縣','故城縣','景 縣','阜城縣','冀州市','深州市']} 
]}, 
{name:'山西', cityList:[ 
{name:'太原市', areaList:['市轄區','小店區','迎澤區','杏花嶺區','尖草坪區','萬柏林區','晉源區','清徐縣','陽曲縣','婁煩縣','古交市']}, 
{name:'大同市', areaList:['市轄區','城 區','礦 區','南郊區','新榮區','陽高縣','天鎮縣','廣靈縣','靈丘縣','渾源縣','左雲縣','大同縣']}, 
{name:'陽泉市', areaList:['市轄區','城 區','礦 區','郊 區','平定縣','盂 縣']}, 
{name:'長治市', areaList:['市轄區','城 區','郊 區','長治縣','襄垣縣','屯留縣','平順縣','黎城縣','壺關縣','長子縣','武鄉縣','沁 縣','沁源縣','潞城市']}, 
{name:'晉城市', areaList:['市轄區','城 區','沁水縣','陽城縣','陵川縣','澤州縣','高平市']}, 
{name:'朔州市', areaList:['市轄區','朔城區','平魯區','山陰縣','應 縣','右玉縣','懷仁縣']}, 
{name:'晉中市', areaList:['市轄區','榆次區','榆社縣','左權縣','和順縣','昔陽縣','壽陽縣','太谷縣','祁 縣','平遙縣','靈石縣','介休市']}, 
{name:'運城市', areaList:['市轄區','鹽湖區','臨猗縣','萬榮縣','聞喜縣','稷山縣','新絳縣','絳 縣','垣曲縣','夏 縣','平陸縣','芮城縣','永濟市','河津市']}, 
{name:'忻州市', areaList:['市轄區','忻府區','定襄縣','五台縣','代 縣','繁峙縣','寧武縣','靜樂縣','神池縣','五寨縣','岢嵐縣','河曲縣','保德縣','偏關縣','原平市']}, 
{name:'臨汾市', areaList:['市轄區','堯都區','曲沃縣','翼城縣','襄汾縣','洪洞縣','古 縣','安澤縣','浮山縣','吉 縣','鄉寧縣','大寧縣','隰 縣','永和縣','蒲 縣','汾西縣','侯馬市','霍州市']}, 
{name:'呂梁市', areaList:['市轄區','離石區','文水縣','交城縣','興 縣','臨 縣','柳林縣','石樓縣','嵐 縣','方山縣','中陽縣','交口縣','孝義市','汾陽市']} 
]}, 
{name:'內蒙古', cityList:[ 
{name:'呼和浩特市', areaList:['市轄區','新城區','回民區','玉泉區','賽罕區','土默特左旗','托克托縣','和林格爾縣','清水河縣','武川縣']}, 
{name:'包頭市', areaList:['市轄區','東河區','昆都侖區','青山區','石拐區','白雲礦區','九原區','土默特右旗','固陽縣','達爾罕茂明安聯合旗']}, 
{name:'烏海市', areaList:['市轄區','海勃灣區','海南區','烏達區']}, 
{name:'赤峰市', areaList:['市轄區','紅山區','元寶山區','松山區','阿魯科爾沁旗','巴林左旗','巴林右旗','林西縣','克什克騰旗','翁牛特旗','喀喇沁旗','寧城縣','敖漢旗']}, 
{name:'通遼市', areaList:['市轄區','科爾沁區','科爾沁左翼中旗','科爾沁左翼后旗','開魯縣','庫倫旗','奈曼旗','扎魯特旗','霍林郭勒市']}, 
{name:'鄂爾多斯市', areaList:['東勝區','達拉特旗','准格爾旗','鄂托克前旗','鄂托克旗','杭錦旗','烏審旗','伊金霍洛旗']}, 
{name:'呼倫貝爾市', areaList:['市轄區','海拉爾區','阿榮旗','莫力達瓦達斡爾族自治旗','鄂倫春自治旗','鄂溫克族自治旗','陳巴爾虎旗','新巴爾虎左旗','新巴爾虎右旗','滿洲里市','牙克石市','扎蘭屯市','額爾古納市','根河市']}, 
{name:'巴彥淖爾市', areaList:['市轄區','臨河區','五原縣','磴口縣','烏拉特前旗','烏拉特中旗','烏拉特后旗','杭錦后旗']}, 
{name:'烏蘭察布市', areaList:['市轄區','集寧區','卓資縣','化德縣','商都縣','興和縣','涼城縣','察哈爾右翼前旗','察哈爾右翼中旗','察哈爾右翼后旗','四子王旗','豐鎮市']}, 
{name:'興安盟', areaList:['烏蘭浩特市','阿爾山市','科爾沁右翼前旗','科爾沁右翼中旗','扎賚特旗','突泉縣']}, 
{name:'錫林郭勒盟', areaList:['二連浩特市','錫林浩特市','阿巴嘎旗','蘇尼特左旗','蘇尼特右旗','東烏珠穆沁旗','西烏珠穆沁旗','太仆寺旗','鑲黃旗','正鑲白旗','正藍旗','多倫縣']}, 
{name:'阿拉善盟', areaList:['阿拉善左旗','阿拉善右旗','額濟納旗']} 
]}, 
{name:'江蘇', cityList:[ 
{name:'南京市', areaList:['市轄區','玄武區','白下區','秦淮區','建鄴區','鼓樓區','下關區','浦口區','棲霞區','雨花台區','江寧區','六合區','溧水縣','高淳縣']}, 
{name:'無錫市', areaList:['市轄區','崇安區','南長區','北塘區','錫山區','惠山區','濱湖區','江陰市','宜興市']}, 
{name:'徐州市', areaList:['市轄區','鼓樓區','雲龍區','九里區','賈汪區','泉山區','豐 縣','沛 縣','銅山縣','睢寧縣','新沂市','邳州市']}, 
{name:'常州市', areaList:['市轄區','天寧區','鍾樓區','戚墅堰區','新北區','武進區','溧陽市','金壇市']}, 
{name:'蘇州市', areaList:['市轄區','滄浪區','平江區','金閶區','虎丘區','吳中區','相城區','常熟市','張家港市','昆山市','吳江市','太倉市']}, 
{name:'南通市', areaList:['市轄區','崇川區','港閘區','海安縣','如東縣','啟東市','如皋市','通州市','海門市']}, 
{name:'連雲港市', areaList:['市轄區','連雲區','新浦區','海州區','贛榆縣','東海縣','灌雲縣','灌南縣']}, 
{name:'淮安市', areaList:['市轄區','清河區','楚州區','淮陰區','清浦區','漣水縣','洪澤縣','盱眙縣','金湖縣']}, 
{name:'鹽城市', areaList:['市轄區','亭湖區','鹽都區','響水縣','濱海縣','阜寧縣','射陽縣','建湖縣','東台市','大豐市']}, 
{name:'揚州市', areaList:['市轄區','廣陵區','邗江區','郊 區','寶應縣','儀征市','高郵市','江都市']}, 
{name:'鎮江市', areaList:['市轄區','京口區','潤州區','丹徒區','丹陽市','揚中市','句容市']}, 
{name:'泰州市', areaList:['市轄區','海陵區','高港區','興化市','靖江市','泰興市','姜堰市']}, 
{name:'宿遷市', areaList:['市轄區','宿城區','宿豫區','沭陽縣','泗陽縣','泗洪縣']} 
]}, 
{name:'浙江', cityList:[ 
{name:'杭州市', areaList:['市轄區','上城區','下城區','江干區','拱墅區','西湖區','濱江區','蕭山區','余杭區','桐廬縣','淳安縣','建德市','富陽市','臨安市']}, 
{name:'寧波市', areaList:['市轄區','海曙區','江東區','江北區','北侖區','鎮海區','鄞州區','象山縣','寧海縣','余姚市','慈溪市','奉化市']}, 
{name:'溫州市', areaList:['市轄區','鹿城區','龍灣區','甌海區','洞頭縣','永嘉縣','平陽縣','蒼南縣','文成縣','泰順縣','瑞安市','樂清市']}, 
{name:'嘉興市', areaList:['市轄區','秀城區','秀洲區','嘉善縣','海鹽縣','海寧市','平湖市','桐鄉市']}, 
{name:'湖州市', areaList:['市轄區','吳興區','南潯區','德清縣','長興縣','安吉縣']}, 
{name:'紹興市', areaList:['市轄區','越城區','紹興縣','新昌縣','諸暨市','上虞市','嵊州市']}, 
{name:'金華市', areaList:['市轄區','婺城區','金東區','武義縣','浦江縣','磐安縣','蘭溪市','義烏市','東陽市','永康市']}, 
{name:'衢州市', areaList:['市轄區','柯城區','衢江區','常山縣','開化縣','龍游縣','江山市']}, 
{name:'舟山市', areaList:['市轄區','定海區','普陀區','岱山縣','嵊泗縣']}, 
{name:'台州市', areaList:['市轄區','椒江區','黃岩區','路橋區','玉環縣','三門縣','天台縣','仙居縣','溫嶺市','臨海市']}, 
{name:'麗水市', areaList:['市轄區','蓮都區','青田縣','縉雲縣','遂昌縣','松陽縣','雲和縣','慶元縣','景寧畲族自治縣','龍泉市']} 
]}, 
{name:'安徽', cityList:[ 
{name:'合肥市', areaList:['市轄區','瑤海區','廬陽區','蜀山區','包河區','長豐縣','肥東縣','肥西縣']}, 
{name:'蕪湖市', areaList:['市轄區','鏡湖區','馬塘區','新蕪區','鳩江區','蕪湖縣','繁昌縣','南陵縣']}, 
{name:'蚌埠市', areaList:['市轄區','龍子湖區','蚌山區','禹會區','淮上區','懷遠縣','五河縣','固鎮縣']}, 
{name:'淮南市', areaList:['市轄區','大通區','田家庵區','謝家集區','八公山區','潘集區','鳳台縣']}, 
{name:'馬鞍山市', areaList:['市轄區','金家庄區','花山區','雨山區','當塗縣']}, 
{name:'淮北市', areaList:['市轄區','杜集區','相山區','烈山區','濉溪縣']}, 
{name:'銅陵市', areaList:['市轄區','銅官山區','獅子山區','郊 區','銅陵縣']}, 
{name:'安慶市', areaList:['市轄區','迎江區','大觀區','郊 區','懷寧縣','樅陽縣','潛山縣','太湖縣','宿松縣','望江縣','岳西縣','桐城市']}, 
{name:'黃山市', areaList:['市轄區','屯溪區','黃山區','徽州區','歙 縣','休寧縣','黟 縣','祁門縣']}, 
{name:'滁州市', areaList:['市轄區','琅琊區','南譙區','來安縣','全椒縣','定遠縣','鳳陽縣','天長市','明光市']}, 
{name:'阜陽市', areaList:['市轄區','潁州區','潁東區','潁泉區','臨泉縣','太和縣','阜南縣','潁上縣','界首市']}, 
{name:'宿州市', areaList:['市轄區','墉橋區','碭山縣','蕭 縣','靈璧縣','泗 縣']}, 
{name:'巢湖市', areaList:['市轄區','居巢區','廬江縣','無為縣','含山縣','和 縣']}, 
{name:'六安市', areaList:['市轄區','金安區','裕安區','壽 縣','霍邱縣','舒城縣','金寨縣','霍山縣']}, 
{name:'亳州市', areaList:['市轄區','譙城區','渦陽縣','蒙城縣','利辛縣']}, 
{name:'池州市', areaList:['市轄區','貴池區','東至縣','石台縣','青陽縣']}, 
{name:'宣城市', areaList:['市轄區','宣州區','郎溪縣','廣德縣','涇 縣','績溪縣','旌德縣','寧國市']} 
]}, 
{name:'福建', cityList:[ 
{name:'福州市', areaList:['市轄區','鼓樓區','台江區','倉山區','馬尾區','晉安區','閩侯縣','連江縣','羅源縣','閩清縣','永泰縣','平潭縣','福清市','長樂市']}, 
{name:'廈門市', areaList:['市轄區','思明區','海滄區','湖里區','集美區','同安區','翔安區']}, 
{name:'莆田市', areaList:['市轄區','城廂區','涵江區','荔城區','秀嶼區','仙游縣']}, 
{name:'三明市', areaList:['市轄區','梅列區','三元區','明溪縣','清流縣','寧化縣','大田縣','尤溪縣','沙 縣','將樂縣','泰寧縣','建寧縣','永安市']}, 
{name:'泉州市', areaList:['市轄區','鯉城區','豐澤區','洛江區','泉港區','惠安縣','安溪縣','永春縣','德化縣','金門縣','石獅市','晉江市','南安市']}, 
{name:'漳州市', areaList:['市轄區','薌城區','龍文區','雲霄縣','漳浦縣','詔安縣','長泰縣','東山縣','南靖縣','平和縣','華安縣','龍海市']}, 
{name:'南平市', areaList:['市轄區','延平區','順昌縣','浦城縣','光澤縣','松溪縣','政和縣','邵武市','武夷山市','建甌市','建陽市']}, 
{name:'龍岩市', areaList:['市轄區','新羅區','長汀縣','永定縣','上杭縣','武平縣','連城縣','漳平市']}, 
{name:'寧德市', areaList:['市轄區','蕉城區','霞浦縣','古田縣','屏南縣','壽寧縣','周寧縣','柘榮縣','福安市','福鼎市']} 
]}, 
{name:'江西', cityList:[ 
{name:'南昌市', areaList:['市轄區','東湖區','西湖區','青雲譜區','灣里區','青山湖區','南昌縣','新建縣','安義縣','進賢縣']}, 
{name:'景德鎮市', areaList:['市轄區','昌江區','珠山區','浮梁縣','樂平市']}, 
{name:'萍鄉市', areaList:['市轄區','安源區','湘東區','蓮花縣','上栗縣','蘆溪縣']}, 
{name:'九江市', areaList:['市轄區','廬山區','潯陽區','九江縣','武寧縣','修水縣','永修縣','德安縣','星子縣','都昌縣','湖口縣','彭澤縣','瑞昌市']}, 
{name:'新余市', areaList:['市轄區','渝水區','分宜縣']}, 
{name:'鷹潭市', areaList:['市轄區','月湖區','余江縣','貴溪市']}, 
{name:'贛州市', areaList:['市轄區','章貢區','贛 縣','信豐縣','大余縣','上猶縣','崇義縣','安遠縣','龍南縣','定南縣','全南縣','寧都縣','於都縣','興國縣','會昌縣','尋烏縣','石城縣','瑞金市','南康市']}, 
{name:'吉安市', areaList:['市轄區','吉州區','青原區','吉安縣','吉水縣','峽江縣','新干縣','永豐縣','泰和縣','遂川縣','萬安縣','安福縣','永新縣','井岡山市']}, 
{name:'宜春市', areaList:['市轄區','袁州區','奉新縣','萬載縣','上高縣','宜豐縣','靖安縣','銅鼓縣','豐城市','樟樹市','高安市']}, 
{name:'撫州市', areaList:['市轄區','臨川區','南城縣','黎川縣','南豐縣','崇仁縣','樂安縣','宜黃縣','金溪縣','資溪縣','東鄉縣','廣昌縣']}, 
{name:'上饒市', areaList:['市轄區','信州區','上饒縣','廣豐縣','玉山縣','鉛山縣','橫峰縣','弋陽縣','余干縣','鄱陽縣','萬年縣','婺源縣','德興市']} 
]}, 
{name:'山東', cityList:[ 
{name:'濟南市', areaList:['市轄區','歷下區','市中區','槐蔭區','天橋區','歷城區','長清區','平陰縣','濟陽縣','商河縣','章丘市']}, 
{name:'青島市', areaList:['市轄區','市南區','市北區','四方區','黃島區','嶗山區','李滄區','城陽區','膠州市','即墨市','平度市','膠南市','萊西市']}, 
{name:'淄博市', areaList:['市轄區','淄川區','張店區','博山區','臨淄區','周村區','桓台縣','高青縣','沂源縣']}, 
{name:'棗庄市', areaList:['市轄區','市中區','薛城區','嶧城區','台兒庄區','山亭區','滕州市']}, 
{name:'東營市', areaList:['市轄區','東營區','河口區','墾利縣','利津縣','廣饒縣']}, 
{name:'煙台市', areaList:['市轄區','芝罘區','福山區','牟平區','萊山區','長島縣','龍口市','萊陽市','萊州市','蓬萊市','招遠市','棲霞市','海陽市']}, 
{name:'濰坊市', areaList:['市轄區','濰城區','寒亭區','坊子區','奎文區','臨朐縣','昌樂縣','青州市','諸城市','壽光市','安丘市','高密市','昌邑市']}, 
{name:'濟寧市', areaList:['市轄區','市中區','任城區','微山縣','魚台縣','金鄉縣','嘉祥縣','汶上縣','泗水縣','梁山縣','曲阜市','兗州市','鄒城市']}, 
{name:'泰安市', areaList:['市轄區','泰山區','岱岳區','寧陽縣','東平縣','新泰市','肥城市']}, 
{name:'威海市', areaList:['市轄區','環翠區','文登市','榮成市','乳山市']}, 
{name:'日照市', areaList:['市轄區','東港區','嵐山區','五蓮縣','莒 縣']}, 
{name:'萊蕪市', areaList:['市轄區','萊城區','鋼城區']}, 
{name:'臨沂市', areaList:['市轄區','蘭山區','羅庄區','河東區','沂南縣','郯城縣','沂水縣','蒼山縣','費 縣','平邑縣','莒南縣','蒙陰縣','臨沭縣']}, 
{name:'德州市', areaList:['市轄區','德城區','陵 縣','寧津縣','慶雲縣','臨邑縣','齊河縣','平原縣','夏津縣','武城縣','樂陵市','禹城市']}, 
{name:'聊城市', areaList:['市轄區','東昌府區','陽谷縣','莘 縣','茌平縣','東阿縣','冠 縣','高唐縣','臨清市']}, 
{name:'濱州市', areaList:['市轄區','濱城區','惠民縣','陽信縣','無棣縣','沾化縣','博興縣','鄒平縣']}, 
{name:'荷澤市', areaList:['市轄區','牡丹區','曹 縣','單 縣','成武縣','巨野縣','鄆城縣','鄄城縣','定陶縣','東明縣']} 
]}, 
{name:'遼寧', cityList:[ 
{name:'沈陽市', areaList:['市轄區','和平區','沈河區','大東區','皇姑區','鐵西區','蘇家屯區','東陵區','新城子區','於洪區','遼中縣','康平縣','法庫縣','新民市']}, 
{name:'大連市', areaList:['市轄區','中山區','西崗區','沙河口區','甘井子區','旅順口區','金州區','長海縣','瓦房店市','普蘭店市','庄河市']}, 
{name:'鞍山市', areaList:['市轄區','鐵東區','鐵西區','立山區','千山區','台安縣','岫岩滿族自治縣','海城市']}, 
{name:'撫順市', areaList:['市轄區','新撫區','東洲區','望花區','順城區','撫順縣','新賓滿族自治縣','清原滿族自治縣']}, 
{name:'本溪市', areaList:['市轄區','平山區','溪湖區','明山區','南芬區','本溪滿族自治縣','桓仁滿族自治縣']}, 
{name:'丹東市', areaList:['市轄區','元寶區','振興區','振安區','寬甸滿族自治縣','東港市','鳳城市']}, 
{name:'錦州市', areaList:['市轄區','古塔區','凌河區','太和區','黑山縣','義 縣','凌海市','北寧市']}, 
{name:'營口市', areaList:['市轄區','站前區','西市區','鮁魚圈區','老邊區','蓋州市','大石橋市']}, 
{name:'阜新市', areaList:['市轄區','海州區','新邱區','太平區','清河門區','細河區','阜新蒙古族自治縣','彰武縣']}, 
{name:'遼陽市', areaList:['市轄區','白塔區','文聖區','宏偉區','弓長嶺區','太子河區','遼陽縣','燈塔市']}, 
{name:'盤錦市', areaList:['市轄區','雙台子區','興隆台區','大窪縣','盤山縣']}, 
{name:'鐵嶺市', areaList:['市轄區','銀州區','清河區','鐵嶺縣','西豐縣','昌圖縣','調兵山市','開原市']}, 
{name:'朝陽市', areaList:['市轄區','雙塔區','龍城區','朝陽縣','建平縣','喀喇沁左翼蒙古族自治縣','北票市','凌源市']}, 
{name:'葫蘆島市', areaList:['市轄區','連山區','龍港區','南票區','綏中縣','建昌縣','興城市']} 
]}, 
{name:'吉林', cityList:[ 
{name:'長春市', areaList:['市轄區','南關區','寬城區','朝陽區','二道區','綠園區','雙陽區','農安縣','九台市','榆樹市','德惠市']}, 
{name:'吉林市', areaList:['市轄區','昌邑區','龍潭區','船營區','豐滿區','永吉縣','蛟河市','樺甸市','舒蘭市','磐石市']}, 
{name:'四平市', areaList:['市轄區','鐵西區','鐵東區','梨樹縣','伊通滿族自治縣','公主嶺市','雙遼市']}, 
{name:'遼源市', areaList:['市轄區','龍山區','西安區','東豐縣','東遼縣']}, 
{name:'通化市', areaList:['市轄區','東昌區','二道江區','通化縣','輝南縣','柳河縣','梅河口市','集安市']}, 
{name:'白山市', areaList:['市轄區','八道江區','撫松縣','靖宇縣','長白朝鮮族自治縣','江源縣','臨江市']}, 
{name:'松原市', areaList:['市轄區','寧江區','前郭爾羅斯蒙古族自治縣','長嶺縣','乾安縣','扶余縣']}, 
{name:'白城市', areaList:['市轄區','洮北區','鎮賚縣','通榆縣','洮南市','大安市']}, 
{name:'延邊朝鮮族自治州', areaList:['延吉市','圖們市','敦化市','琿春市','龍井市','和龍市','汪清縣','安圖縣']} 
]}, 
{name:'黑龍江', cityList:[ 
{name:'哈爾濱市', areaList:['市轄區','道里區','南崗區','道外區','香坊區','動力區','平房區','松北區','呼蘭區','依蘭縣','方正縣','賓 縣','巴彥縣','木蘭縣','通河縣','延壽縣','阿城市','雙城市','尚志市','五常市']}, 
{name:'齊齊哈爾市', areaList:['市轄區','龍沙區','建華區','鐵鋒區','昂昂溪區','富拉爾基區','碾子山區','梅里斯達斡爾族區','龍江縣','依安縣','泰來縣','甘南縣','富裕縣','克山縣','克東縣','拜泉縣','訥河市']}, 
{name:'雞西市', areaList:['市轄區','雞冠區','恆山區','滴道區','梨樹區','城子河區','麻山區','雞東縣','虎林市','密山市']}, 
{name:'鶴崗市', areaList:['市轄區','向陽區','工農區','南山區','興安區','東山區','興山區','蘿北縣','綏濱縣']}, 
{name:'雙鴨山市', areaList:['市轄區','尖山區','嶺東區','四方台區','寶山區','集賢縣','友誼縣','寶清縣','饒河縣']}, 
{name:'大慶市', areaList:['市轄區','薩爾圖區','龍鳳區','讓胡路區','紅崗區','大同區','肇州縣','肇源縣','林甸縣','杜爾伯特蒙古族自治縣']}, 
{name:'伊春市', areaList:['市轄區','伊春區','南岔區','友好區','西林區','翠巒區','新青區','美溪區','金山屯區','五營區','烏馬河區','湯旺河區','帶嶺區','烏伊嶺區','紅星區','上甘嶺區','嘉蔭縣','鐵力市']}, 
{name:'佳木斯市', areaList:['市轄區','永紅區','向陽區','前進區','東風區','郊 區','樺南縣','樺川縣','湯原縣','撫遠縣','同江市','富錦市']}, 
{name:'七台河市', areaList:['市轄區','新興區','桃山區','茄子河區','勃利縣']}, 
{name:'牡丹江市', areaList:['市轄區','東安區','陽明區','愛民區','西安區','東寧縣','林口縣','綏芬河市','海林市','寧安市','穆棱市']}, 
{name:'黑河市', areaList:['市轄區','愛輝區','嫩江縣','遜克縣','孫吳縣','北安市','五大連池市']}, 
{name:'綏化市', areaList:['市轄區','北林區','望奎縣','蘭西縣','青岡縣','慶安縣','明水縣','綏棱縣','安達市','肇東市','海倫市']}, 
{name:'大興安嶺地區', areaList:['呼瑪縣','塔河縣','漠河縣']} 
]}, 
{name:'海南', cityList:[ 
{name:'海口市', areaList:['市轄區','秀英區','龍華區','瓊山區','美蘭區']}, 
{name:'三亞市', areaList:['市轄區']}, 
{name:'省直轄縣級行政單位', areaList:['五指山市','瓊海市','儋州市','文昌市','萬寧市','東方市','定安縣','屯昌縣','澄邁縣','臨高縣','白沙黎族自治縣','昌江黎族自治縣','樂東黎族自治縣','陵水黎族自治縣','保亭黎族苗族自治縣','瓊中黎族苗族自治縣','西沙群島','南沙群島','中沙群島的島礁及其海域']} 
]}, 
{name:'台灣', cityList:[ 
]}, 
{name:'香港', cityList:[ 
]}, 
{name:'澳門', cityList:[ 
]} 
];
var provinceArray = new Array();
var cityArray = new Array();
var areaArray = new Array();
var provinceTag = document.getElementById("province");
var cityTag = document.getElementById("city");
var areaTag = document.getElementById("area");
window.onload=function()//用window的onload事件,窗體加載完畢的時候
{
var provinceTag = document.getElementById("province");
var cityTag = document.getElementById("city");
var areaTag = document.getElementById("area");
        for(var i=0; i<provinceList.length; i++){    //provinceList.length為省數組的長度,下標從0開始,所以定義var i=0
        var province = provinceList[i];          //通過下標獲取省列表(上面的列出列表)中的數據
        var provinceName = province.name;        //根據 province.name獲取省的名字
        console.log(provinceName);             //這步可以不需要,為了方便在網頁打印台上顯示出來,方便我們獲取數據
        provinceArray[i]=provinceName;           //將獲得的省的名字注入到數組中去
        provinceTag.add(new Option(provinceName,i));    //通過Option方法將省的名字與下標i對應,取出來。然后通過add()方法,將每一個名字放到provinceTag中
        }
}



//建立省市之間的連接

function chooseProvince(th){        //通過方法的調用來實現省 市之間的二級聯動,th是我們設置的一個參數,方便下面進行使用,可以理解為province的一個元素(名字)
var provinceTag = document.getElementById("province");
var cityTag = document.getElementById("city");
var areaTag = document.getElementById("area");
var index = th.selectedIndex-1;          //此處selectedIndex的索引減1是因為我們在寫<select><option>按鈕時  “請選擇省”  占了一個索引,所以需要減1才能對應
var provinceName = provinceArray[index];    //通過數組下標獲取數據(名字)

for(var n=0; n<provinceList.length; n++){    //通過循環遍歷列表數組
var provice = provinceList[n];           //通過列表下標獲取數據
console.log(provice.name == provinceName);  //控制台打印方便觀看
if (provice.name == provinceName){      //開始建立連接,通過if判斷,前提是要滿足if中的條件
cityList = provice.cityList;            //通過province的cityList獲取城市列表
cityTag.innerHTML="";              //這個步驟很重要,分析語句,是吧里面的內容變為空,意思就是當你選擇一個省時,后面會出現城市的數據,當你選擇另外的省時會                                                                            出現相應的市的數據,如果不刪除就會同時顯示在一個選擇框中,就不會是我們想要的結果
console.log(cityList);              //控制台打印
for(var c=0; c<cityList.length; c++){      //使用循環遍歷城市數列
var city = cityList[c];               //根據數列下標獲取城市數據
var cityName = city.name;            //獲取城市的名字
cityArray[c] = cityName;             //將城市名稱存入數組中
cityTag.add(new Option(cityName,c));      //使用Option()方法獲取每一個索引對應的數據,然后使用add()方法一一存入到數組中去,這樣就可以成功創建省市連接
}
}
}

}    


function chooseCity(ci){
var provinceTag = document.getElementById("province");
var cityTag = document.getElementById("city");
var areaTag = document.getElementById("area");
var index = ci.selectedIndex;
var cityName = cityArray[index];
for(var j=0;j<cityList.length;j++){
var city = cityList[j];
if(city.name == cityName){
var areaList = city.areaList;
areaTag.innerHTML = "";
for( var k=0;k<areaList.length;k++){
var area = areaList[k];
areaTag.add(new Option(area,k));
}
}
}
}

</script>

<select id="province" onchange="chooseProvince(this)">
<option value="1">請選擇省</option>
</select>
<select id="city" onchange="chooseCity(this)">
<option value="2">請選擇市</option>
</select>
<select id="area">
<option value="3">請選擇區</option>
</select>

</body>
</html>
打賞

免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2021 CODEPRJ.COM