溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

JS如何實(shí)現(xiàn)經(jīng)典的中國(guó)地區(qū)三級(jí)聯(lián)動(dòng)下拉菜單功能

發(fā)布時(shí)間:2021-04-23 11:43:16 來(lái)源:億速云 閱讀:158 作者:小新 欄目:web開(kāi)發(fā)

這篇文章主要介紹JS如何實(shí)現(xiàn)經(jīng)典的中國(guó)地區(qū)三級(jí)聯(lián)動(dòng)下拉菜單功能,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

js的作用是什么

1、能夠嵌入動(dòng)態(tài)文本于HTML頁(yè)面。2、對(duì)瀏覽器事件做出響應(yīng)。3、讀寫(xiě)HTML元素。4、在數(shù)據(jù)被提交到服務(wù)器之前驗(yàn)證數(shù)據(jù)。5、檢測(cè)訪客的瀏覽器信息。6、控制cookies,包括創(chuàng)建和修改等。7、基于Node.js技術(shù)進(jìn)行服務(wù)器端編程。

具體如下:

1.首先是js文件(area.js):

function Dsy()
{
this.Items = {};
}
Dsy.prototype.add = function(id,iArray)
{
this.Items[id] = iArray;
}
Dsy.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == "undefined") return false;
return true;
}
function change(v){
var str="0";
for(i=0;i<v;i++){ str+=("_"+(document.getElementById(s[i]).selectedIndex-1));};
var ss=document.getElementById(s[v]);
with(ss){
 length = 0;
 options[0]=new Option(opt0[v],opt0[v]);
 if(v && document.getElementById(s[v-1]).selectedIndex>0 || !v)
 {
  if(dsy.Exists(str)){
  ar = dsy.Items[str];
  for(i=0;i<ar.length;i++)options[length]=new Option(ar[i],ar[i]);
  if(v)options[1].selected = true;
  }
 }
 if(++v<s.length){change(v);}
}
}
var dsy = new Dsy();
dsy.add("0",["安徽","北京","福建","甘肅","廣東","廣西","貴州","海南","河北","河南","黑龍江","湖北","湖南","吉林","江蘇","江西","遼寧","內(nèi)蒙古","寧夏","青海","山東","山西","陜西","上海","四川","天津","西藏","新疆","云南","浙江","重慶"]);
dsy.add("0_0",["安慶","蚌埠","巢湖","池州","滁州","阜陽(yáng)","合肥","淮北","淮南","黃山","六安","馬鞍山","宿州","銅陵","蕪湖","宣城","亳州"]);
dsy.add("0_0_0",["安慶市","懷寧縣","潛山縣","宿松縣","太湖縣","桐城市","望江縣","岳西縣","樅陽(yáng)縣"]);
dsy.add("0_0_1",["蚌埠市","固鎮(zhèn)縣","懷遠(yuǎn)縣","五河縣"]);
dsy.add("0_0_2",["巢湖市","含山縣","和縣","廬江縣","無(wú)為縣"]);
dsy.add("0_0_3",["池州市","東至縣","青陽(yáng)縣","石臺(tái)縣"]);
dsy.add("0_0_4",["滁州市","定遠(yuǎn)縣","鳳陽(yáng)縣","來(lái)安縣","明光市","全椒縣","天長(zhǎng)市"]);
dsy.add("0_0_5",["阜南縣","阜陽(yáng)市","界首市","臨泉縣","太和縣","穎上縣"]);
dsy.add("0_0_6",["長(zhǎng)豐縣","肥東縣","肥西縣"]);
dsy.add("0_0_7",["淮北市","濉溪縣"]);
dsy.add("0_0_8",["鳳臺(tái)縣","淮南市"]);
dsy.add("0_0_9",["黃山市","祁門(mén)縣","休寧縣","歙縣","黟縣"]);
dsy.add("0_0_10",["霍邱縣","霍山縣","金寨縣","六安市","壽縣","舒城縣"]);
dsy.add("0_0_11",["當(dāng)涂縣","馬鞍山市"]);
dsy.add("0_0_12",["靈璧縣","宿州市","蕭縣","泗縣","碭山縣"]);
dsy.add("0_0_13",["銅陵市","銅陵縣"]);
dsy.add("0_0_14",["繁昌縣","南陵縣","蕪湖市","蕪湖縣"]);
dsy.add("0_0_15",["廣德縣","績(jī)溪縣","郎溪縣","寧國(guó)市","宣城市","涇縣","旌德縣"]);
dsy.add("0_0_16",["利辛縣","蒙城縣","渦陽(yáng)縣","亳州市"]);
dsy.add("0_1",["北京"]);
dsy.add("0_1_0",["北京市","密云縣","延慶縣"]);
dsy.add("0_2",["福州","龍巖","南平","寧德","莆田","泉州","三明","廈門(mén)","漳州"]);
dsy.add("0_2_0",["長(zhǎng)樂(lè)市","福清市","福州市","連江縣","羅源縣","閩侯縣","閩清縣","平潭縣","永泰縣"]);
dsy.add("0_2_1",["長(zhǎng)汀縣","連城縣","龍巖市","上杭縣","武平縣","永定縣","漳平市"]);
dsy.add("0_2_2",["光澤縣","建陽(yáng)市","建甌市","南平市","浦城縣","邵武市","順昌縣","松溪縣","武夷山市","政和縣"]);
dsy.add("0_2_3",["福安市","福鼎市","古田縣","寧德市","屏南縣","壽寧縣","霞浦縣","周寧縣","柘榮縣"]);
dsy.add("0_2_4",["莆田市","仙游縣"]);
dsy.add("0_2_5",["安溪縣","德化縣","惠安縣","金門(mén)縣","晉江市","南安市","泉州市","石獅市","永春縣"]);
dsy.add("0_2_6",["大田縣","建寧縣","將樂(lè)縣","明溪縣","寧化縣","清流縣","三明市","沙縣","泰寧縣","永安市","尤溪縣"]);
dsy.add("0_2_7",["廈門(mén)市"]);
dsy.add("0_2_8",["長(zhǎng)泰縣","東山縣","華安縣","龍海市","南靖縣","平和縣","云霄縣","漳浦縣","漳州市","詔安縣"]);
dsy.add("0_3",["白銀","定西","甘南藏族自治州","嘉峪關(guān)","金昌","酒泉","蘭州","臨夏回族自治州","隴南","平?jīng)?quot;,"慶陽(yáng)","天水","武威","張掖"]);
dsy.add("0_3_0",["白銀市","會(huì)寧縣","景泰縣","靖遠(yuǎn)縣"]);
dsy.add("0_3_1",["定西縣","臨洮縣","隴西縣","通渭縣","渭源縣","漳縣","岷縣"]);
dsy.add("0_3_2",["迭部縣","合作市","臨潭縣","碌曲縣","瑪曲縣","夏河縣","舟曲縣","卓尼縣"]);
dsy.add("0_3_3",["嘉峪關(guān)市"]);
dsy.add("0_3_4",["金昌市","永昌縣"]);
dsy.add("0_3_5",["阿克塞哈薩克族自治縣","安西縣","敦煌市","金塔縣","酒泉市","肅北蒙古族自治縣","玉門(mén)市"]);
dsy.add("0_3_6",["皋蘭縣","蘭州市","永登縣","榆中縣"]);
dsy.add("0_3_7",["東鄉(xiāng)族自治縣","廣河縣","和政縣","積石山保安族東鄉(xiāng)族撒拉族自治縣","康樂(lè)縣","臨夏市","臨夏縣","永靖縣"]);
dsy.add("0_3_8",["成縣","徽縣","康縣","禮縣","兩當(dāng)縣","文縣","武都縣","西和縣","宕昌縣"]);
dsy.add("0_3_9",["崇信縣","華亭縣","靜寧縣","靈臺(tái)縣","平?jīng)鍪?quot;,"莊浪縣","涇川縣"]);
dsy.add("0_3_10",["合水縣","華池縣","環(huán)縣","寧縣","慶城縣","慶陽(yáng)市","鎮(zhèn)原縣","正寧縣"]);
dsy.add("0_3_11",["甘谷縣","秦安縣","清水縣","天水市","武山縣","張家川回族自治縣"]);
dsy.add("0_3_12",["古浪縣","民勤縣","天祝藏族自治縣","武威市"]);
dsy.add("0_3_13",["高臺(tái)縣","臨澤縣","民樂(lè)縣","山丹縣","肅南裕固族自治縣","張掖市"]);
dsy.add("0_4",["潮州","東莞","佛山","廣州","河源","惠州","江門(mén)","揭陽(yáng)","茂名","梅州","清遠(yuǎn)","汕頭","汕尾","韶關(guān)","深圳","陽(yáng)江","云浮","湛江","肇慶","中山","珠海"]);
dsy.add("0_4_0",["潮安縣","潮州市","饒平縣"]);
dsy.add("0_4_1",["東莞市"]);
dsy.add("0_4_2",["佛山市"]);
dsy.add("0_4_3",["從化市","廣州市","增城市"]);
dsy.add("0_4_4",["東源縣","和平縣","河源市","連平縣","龍川縣","紫金縣"]);
dsy.add("0_4_5",["博羅縣","惠東縣","惠陽(yáng)市","惠州市","龍門(mén)縣"]);
dsy.add("0_4_6",["恩平市","鶴山市","江門(mén)市","開(kāi)平市","臺(tái)山市"]);
dsy.add("0_4_7",["惠來(lái)縣","揭東縣","揭西縣","揭陽(yáng)市","普寧市"]);
dsy.add("0_4_8",["電白縣","高州市","化州市","茂名市","信宜市"]);
dsy.add("0_4_9",["大埔縣","豐順縣","蕉嶺縣","梅縣","梅州市","平遠(yuǎn)縣","五華縣","興寧市"]);
dsy.add("0_4_10",["佛岡縣","連南瑤族自治縣","連山壯族瑤族自治縣","連州市","清新縣","清遠(yuǎn)市","陽(yáng)山縣","英德市"]);
dsy.add("0_4_11",["潮陽(yáng)市","澄海市","南澳縣","汕頭市"]);
dsy.add("0_4_12",["海豐縣","陸豐市","陸河縣","汕尾市"]);
dsy.add("0_4_13",["樂(lè)昌市","南雄市","曲江縣","仁化縣","乳源瑤族自治縣","韶關(guān)市","始興縣","翁源縣","新豐縣"]);
dsy.add("0_4_14",["深圳市"]);
dsy.add("0_4_15",["陽(yáng)春市","陽(yáng)東縣","陽(yáng)江市","陽(yáng)西縣"]);
dsy.add("0_4_16",["羅定市","新興縣","郁南縣","云安縣","云浮市"]);
dsy.add("0_4_17",["雷州市","廉江市","遂溪縣","吳川市","徐聞縣","湛江市"]);
dsy.add("0_4_18",["德慶縣","封開(kāi)縣","高要市","廣寧縣","懷集縣","四會(huì)市","肇慶市"]);
dsy.add("0_4_19",["中山市"]);
dsy.add("0_4_20",["珠海市"]);
dsy.add("0_5",["百色","北海","崇左","防城港","桂林","貴港","河池","賀州","來(lái)賓","柳州","南寧","欽州","梧州","玉林"]);
dsy.add("0_5_0",["百色市","德??h","靖西縣","樂(lè)業(yè)縣","凌云縣","隆林各族自治縣","那坡縣","平果縣","田東縣","田林縣","田陽(yáng)縣","西林縣"]);
dsy.add("0_5_1",["北海市","合浦縣"]);
dsy.add("0_5_2",["崇左市","大新縣","扶綏縣","龍州縣","寧明縣","憑祥市","天等縣"]);
dsy.add("0_5_3",["東興市","防城港市","上思縣"]);
dsy.add("0_5_4",["恭城瑤族自治縣","灌陽(yáng)縣","桂林市","荔浦縣","臨桂縣","靈川縣","龍勝各族自治縣","平樂(lè)縣","全州縣","興安縣","陽(yáng)朔縣","永??h","資源縣"]);
dsy.add("0_5_5",["桂平市","貴港市","平南縣"]);
dsy.add("0_5_6",["巴馬瑤族自治縣","大化瑤族自治縣","東蘭縣","都安瑤族自治縣","鳳山縣","河池市","環(huán)江毛南族自治縣","羅城仡佬族自治縣","南丹縣","天峨縣","宜州市"]);
dsy.add("0_5_7",["富川瑤族自治縣","賀州市","昭平縣","鐘山縣"]);
dsy.add("0_5_8",["合山市","金秀瑤族自治縣","來(lái)賓市","武宣縣","象州縣","忻城縣"]);
dsy.add("0_5_9",["柳城縣","柳江縣","柳州市","鹿寨縣","融安縣","融水苗族自治縣","三江侗族自治縣"]);
dsy.add("0_5_10",["賓陽(yáng)縣","橫縣","隆安縣","馬山縣","南寧市","上林縣","武鳴縣","邕寧縣"]);
dsy.add("0_5_11",["靈山縣","浦北縣","欽州市"]);
dsy.add("0_5_12",["蒼梧縣","蒙山縣","藤縣","梧州市","岑溪市"]);
dsy.add("0_5_13",["北流市","博白縣","陸川縣","容縣","興業(yè)縣","玉林市"]);
dsy.add("0_6",["安順","畢節(jié)","貴陽(yáng)","六盤(pán)水","黔東南苗族侗族自治州","黔南布依族苗族自治州","黔西南布依族苗族自治州","銅仁","遵義"]);
dsy.add("0_6_0",["安順市","關(guān)嶺布依族苗族自治縣","平壩縣","普定縣","鎮(zhèn)寧布依族苗族自治縣","紫云苗族布依族自治縣"]);
dsy.add("0_6_1",["畢節(jié)市","大方縣","赫章縣","金沙縣","納雍縣","黔西縣","威寧彝族回族苗族自治縣","織金縣"]);
dsy.add("0_6_2",["貴陽(yáng)市","開(kāi)陽(yáng)縣","清鎮(zhèn)市","息烽縣","修文縣"]);
dsy.add("0_6_3",["六盤(pán)水市","六枝特區(qū)","盤(pán)縣","水城縣"]);
dsy.add("0_6_4",["從江縣","丹寨縣","黃平縣","劍河縣","錦屏縣","凱里市","雷山縣","黎平縣","麻江縣","三穗縣","施秉縣","臺(tái)江縣","天柱縣","鎮(zhèn)遠(yuǎn)縣","岑鞏縣","榕江縣"]);
dsy.add("0_6_5",["長(zhǎng)順縣","都勻市","獨(dú)山縣","福泉市","貴定縣","惠水縣","荔波縣","龍里縣","羅甸縣","平塘縣","三都水族自治縣","甕安縣"]);
dsy.add("0_6_6",["安龍縣","冊(cè)亨縣","普安縣","晴隆縣","望謨縣","興仁縣","興義市","貞豐縣"]);
dsy.add("0_6_7",["德江縣","江口縣","石阡縣","思南縣","松桃苗族自治縣","銅仁市","萬(wàn)山特區(qū)","沿河土家族自治縣","印江土家族苗族自治縣","玉屏侗族自治縣"]);
dsy.add("0_6_8",["赤水市","道真仡佬族苗族自治縣","鳳岡縣","仁懷市","綏陽(yáng)縣","桐梓縣","務(wù)川仡佬族苗族自治縣","習(xí)水縣","余慶縣","正安縣","遵義市","遵義縣","湄潭縣"]);
dsy.add("0_7",["白沙黎族自治縣","保亭黎族苗族自治縣","昌江黎族自治縣","澄邁縣","定安縣","東方","???quot;,"樂(lè)東黎族自治縣","臨高縣","陵水黎族自治縣","瓊海","瓊中黎族苗族自治縣","三亞","屯昌縣","萬(wàn)寧","文昌","五指山","儋州"]);
dsy.add("0_7_0",["白沙黎族自治縣"]);
dsy.add("0_7_1",["保亭黎族苗族自治縣"]);
dsy.add("0_7_2",["昌江黎族自治縣"]);
dsy.add("0_7_3",["澄邁縣"]);
dsy.add("0_7_4",["定安縣"]);
dsy.add("0_7_5",["東方市"]);
dsy.add("0_7_6",["海口市"]);
dsy.add("0_7_7",["樂(lè)東黎族自治縣"]);
dsy.add("0_7_8",["臨高縣"]);
dsy.add("0_7_9",["陵水黎族自治縣"]);
dsy.add("0_7_10",["瓊海市"]);
dsy.add("0_7_11",["瓊中黎族苗族自治縣"]);
dsy.add("0_7_12",["三亞市"]);
dsy.add("0_7_13",["屯昌縣"]);
dsy.add("0_7_14",["萬(wàn)寧市"]);
dsy.add("0_7_15",["文昌市"]);
dsy.add("0_7_16",["五指山市"]);
dsy.add("0_7_17",["儋州市"]);
dsy.add("0_8",["保定","滄州","承德","邯鄲","衡水","廊坊","秦皇島","石家莊","唐山","邢臺(tái)","張家口"]);
dsy.add("0_8_0",["安國(guó)市","安新縣","保定市","博野縣","定興縣","定州市","阜平縣","高碑店市","高陽(yáng)縣","滿城縣","清苑縣","曲陽(yáng)縣","容城縣","順平縣","唐縣","望都縣","雄縣","徐水縣","易縣","淶水縣","淶源縣","涿州市","蠡縣"]);
dsy.add("0_8_1",["泊頭市","滄縣","滄州市","東光縣","海興縣","河間市","黃驊市","孟村回族自治縣","南皮縣","青縣","任丘市","肅寧縣","吳橋縣","獻(xiàn)縣","鹽山縣"]);
dsy.add("0_8_2",["承德市","承德縣","豐寧滿族自治縣","寬城滿族自治縣","隆化縣","灤平縣","平泉縣","圍場(chǎng)滿族蒙古族自治縣","興隆縣"]);
dsy.add("0_8_3",["成安縣","磁縣","大名縣","肥鄉(xiāng)縣","館陶縣","廣平縣","邯鄲市","邯鄲縣","雞澤縣","臨漳縣","邱縣","曲周縣","涉縣","魏縣","武安市","永年縣"]);
dsy.add("0_8_4",["安平縣","阜城縣","故城縣","衡水市","冀州市","景縣","饒陽(yáng)縣","深州市","武強(qiáng)縣","武邑縣","棗強(qiáng)縣"]);
dsy.add("0_8_5",["霸州市","大廠回族自治縣","大城縣","固安縣","廊坊市","三河市","文安縣","香河縣","永清縣"]);
dsy.add("0_8_6",["昌黎縣","撫寧縣","盧龍縣","秦皇島市","青龍滿族自治縣"]);
dsy.add("0_8_7",["高邑縣","晉州市","井陘縣","靈壽縣","鹿泉市","平山縣","深澤縣","石家莊市","無(wú)極縣","辛集市","新樂(lè)市","行唐縣","元氏縣","贊皇縣","趙縣","正定縣","藁城市","欒城縣"]);
dsy.add("0_8_8",["樂(lè)亭縣","灤南縣","灤縣","遷安市","遷西縣","唐??h","唐山市","玉田縣","遵化市"]);
dsy.add("0_8_9",["柏鄉(xiāng)縣","廣宗縣","巨鹿縣","臨城縣","臨西縣","隆堯縣","南宮市","南和縣","內(nèi)丘縣","寧晉縣","平鄉(xiāng)縣","清河縣","任縣","沙河市","威縣","新河縣","邢臺(tái)市","邢臺(tái)縣"]);
dsy.add("0_8_10",["赤城縣","崇禮縣","沽源縣","懷安縣","懷來(lái)縣","康保縣","尚義縣","萬(wàn)全縣","蔚縣","宣化縣","陽(yáng)原縣","張北縣","張家口市","涿鹿縣"]);
dsy.add("0_9",["安陽(yáng)","鶴壁","濟(jì)源","焦作","開(kāi)封","洛陽(yáng)","南陽(yáng)","平頂山","三門(mén)峽","商丘","新鄉(xiāng)","信陽(yáng)","許昌","鄭州","周口","駐馬店","漯河","濮陽(yáng)"]);
dsy.add("0_9_0",["安陽(yáng)市","安陽(yáng)縣","滑縣","林州市","內(nèi)黃縣","湯陰縣"]);
dsy.add("0_9_1",["","鶴壁市","??h","淇縣"]);
dsy.add("0_9_2",["濟(jì)源市"]);
dsy.add("0_9_3",["博愛(ài)縣","焦作市","孟州市","沁陽(yáng)市","溫縣","武陟縣","修武縣"]);
dsy.add("0_9_4",["開(kāi)封市","開(kāi)封縣","蘭考縣","通許縣","尉氏縣","杞縣"]);
dsy.add("0_9_5",["洛寧縣","洛陽(yáng)市","孟津縣","汝陽(yáng)縣","新安縣","伊川縣","宜陽(yáng)縣","偃師市","嵩縣","欒川縣"]);
dsy.add("0_9_6",["鄧州市","方城縣","南陽(yáng)市","南召縣","內(nèi)鄉(xiāng)縣","社旗縣","唐河縣","桐柏縣","西峽縣","新野縣","鎮(zhèn)平縣","淅川縣"]);
dsy.add("0_9_7",["寶豐縣","魯山縣","平頂山市","汝州市","舞鋼市","葉縣","郟縣"]);
dsy.add("0_9_8",["靈寶市","盧氏縣","三門(mén)峽市","陜縣","義馬市","澠池縣"]);
dsy.add("0_9_9",["民權(quán)縣","寧陵縣","商丘市","夏邑縣","永城市","虞城縣","柘城縣","睢縣"]);
dsy.add("0_9_10",["長(zhǎng)垣縣","封丘縣","輝縣市","獲嘉縣","衛(wèi)輝市","新鄉(xiāng)市","新鄉(xiāng)縣","延津縣","原陽(yáng)縣"]);
dsy.add("0_9_11",["固始縣","光山縣","淮濱縣","羅山縣","商城縣","息縣","新縣","信陽(yáng)市","潢川縣"]);
dsy.add("0_9_12",["長(zhǎng)葛市","襄城縣","許昌市","許昌縣","禹州市","鄢陵縣"]);
dsy.add("0_9_13",["登封市","鞏義市","新密市","新鄭市","鄭州市","中牟縣","滎陽(yáng)市"]);
dsy.add("0_9_14",["鄲城縣","扶溝縣","淮陽(yáng)縣","鹿邑縣","商水縣","沈丘縣","太康縣","西華縣","項(xiàng)城市","周口市"]);
dsy.add("0_9_15",["泌陽(yáng)縣","平輿縣","確山縣","汝南縣","上蔡縣","遂平縣","西平縣","新蔡縣","正陽(yáng)縣","駐馬店市"]);
dsy.add("0_9_16",["臨潁縣","舞陽(yáng)縣","郾城縣","漯河市"]);
dsy.add("0_9_17",["范縣","南樂(lè)縣","清豐縣","臺(tái)前縣","濮陽(yáng)市","濮陽(yáng)縣"]);
dsy.add("0_10",["大慶","大興安嶺","哈爾濱","鶴崗","黑河","雞西","佳木斯","牡丹江","七臺(tái)河","齊齊哈爾","雙鴨山","綏化","伊春"]);
dsy.add("0_10_0",["大慶市","杜爾伯特蒙古族自治縣","林甸縣","肇源縣","肇州縣"]);
dsy.add("0_10_1",["呼瑪縣","漠河縣","塔河縣"]);
dsy.add("0_10_2",["阿城市","巴彥縣","賓縣","方正縣","哈爾濱市","呼蘭縣","木蘭縣","尚志市","雙城市","通河縣","五常市","延壽縣","依蘭縣"]);
dsy.add("0_10_3",["鶴崗市","蘿北縣","綏濱縣"]);
dsy.add("0_10_4",["北安市","黑河市","嫩江縣","孫吳縣","五大連池市","遜克縣"]);
dsy.add("0_10_5",["虎林市","雞東縣","雞西市","密山市"]);
dsy.add("0_10_6",["撫遠(yuǎn)縣","富錦市","佳木斯市","湯原縣","同江市","樺川縣","樺南縣"]);
dsy.add("0_10_7",["東寧縣","海林市","林口縣","牡丹江市","穆棱市","寧安市","綏芬河市"]);
dsy.add("0_10_8",["勃利縣","七臺(tái)河市"]);
dsy.add("0_10_9",["拜泉縣","富??h","甘南縣","克東縣","克山縣","龍江縣","齊齊哈爾市","泰來(lái)縣","依安縣","訥河市"]);
dsy.add("0_10_10",["寶清縣","集賢縣","饒河縣","雙鴨山市","友誼縣"]);
dsy.add("0_10_11",["安達(dá)市","海倫市","蘭西縣","明水縣","青岡縣","慶安縣","綏化市","綏棱縣","望奎縣","肇東市"]);
dsy.add("0_10_12",["嘉蔭縣","鐵力市","伊春市"]);
dsy.add("0_11",["鄂州","恩施土家族苗族自治州","黃岡","黃石","荊門(mén)","荊州","潛江","神農(nóng)架林區(qū)","十堰","隨州","天門(mén)","武漢","仙桃","咸寧","襄樊","孝感","宜昌"]);
dsy.add("0_11_0",["鄂州市"]);
dsy.add("0_11_1",["巴東縣","恩施市","鶴峰縣","建始縣","來(lái)鳳縣","利川市","咸豐縣","宣恩縣"]);
dsy.add("0_11_2",["紅安縣","黃岡市","黃梅縣","羅田縣","麻城市","團(tuán)風(fēng)縣","武穴市","英山縣","蘄春縣","浠水縣"]);
dsy.add("0_11_3",["大冶市","黃石市","陽(yáng)新縣"]);
dsy.add("0_11_4",["荊門(mén)市","京山縣","沙洋縣","鐘祥市"]);
dsy.add("0_11_5",["公安縣","洪湖市","監(jiān)利縣","江陵縣","荊州市","石首市","松滋市"]);
dsy.add("0_11_6",["潛江市"]);
dsy.add("0_11_7",["神農(nóng)架林區(qū)"]);
dsy.add("0_11_8",["丹江口市","房縣","十堰市","鄖西縣","鄖縣","竹山縣","竹溪縣"]);
dsy.add("0_11_9",["廣水市","隨州市"]);
dsy.add("0_11_10",["天門(mén)市"]);
dsy.add("0_11_11",["武漢市"]);
dsy.add("0_11_12",["仙桃市"]);
dsy.add("0_11_13",["赤壁市","崇陽(yáng)縣","嘉魚(yú)縣","通城縣","通山縣","咸寧市"]);
dsy.add("0_11_14",["保康縣","谷城縣","老河口市","南漳縣","襄樊市","宜城市","棗陽(yáng)市"]);
dsy.add("0_11_15",["安陸市","大悟縣","漢川市","孝昌縣","孝感市","應(yīng)城市","云夢(mèng)縣"]);
dsy.add("0_11_16",["長(zhǎng)陽(yáng)土家族自治縣","當(dāng)陽(yáng)市","五峰土家族自治縣","興山縣","宜昌市","宜都市","遠(yuǎn)安縣","枝江市","秭歸縣"]);
dsy.add("0_12",["常德","長(zhǎng)沙","郴州","衡陽(yáng)","懷化","婁底","邵陽(yáng)","湘潭","湘西土家族苗族自治州","益陽(yáng)","永州","岳陽(yáng)","張家界","株洲"]);
dsy.add("0_12_0",["安鄉(xiāng)縣","常德市","漢壽縣","津市市","臨澧縣","石門(mén)縣","桃源縣","澧縣"]);
dsy.add("0_12_1",["長(zhǎng)沙市","長(zhǎng)沙縣","寧鄉(xiāng)縣","望城縣","瀏陽(yáng)市"]);
dsy.add("0_12_2",["安仁縣","郴州市","桂東縣","桂陽(yáng)縣","嘉禾縣","臨武縣","汝城縣","宜章縣","永興縣","資興市"]);
dsy.add("0_12_3",["常寧市","衡東縣","衡南縣","衡山縣","衡陽(yáng)市","衡陽(yáng)縣","祁東縣","耒陽(yáng)市"]);
dsy.add("0_12_4",["辰溪縣","洪江市","懷化市","會(huì)同縣","靖州苗族侗族自治縣","麻陽(yáng)苗族自治縣","通道侗族自治縣","新晃侗族自治縣","中方縣","芷江侗族自治縣","沅陵縣","溆浦縣"]);
dsy.add("0_12_5",["冷水江市","漣源市","婁底市","雙峰縣","新化縣"]);
dsy.add("0_12_6",["城步苗族自治縣","洞口縣","隆回縣","邵東縣","邵陽(yáng)市","邵陽(yáng)縣","綏寧縣","武岡市","新寧縣","新邵縣"]);
dsy.add("0_12_7",["韶山市","湘潭市","湘潭縣","湘鄉(xiāng)市"]);
dsy.add("0_12_8",["保靖縣","鳳凰縣","古丈縣","花垣縣","吉首市","龍山縣","永順縣","瀘溪縣"]);
dsy.add("0_12_9",["安化縣","南縣","桃江縣","益陽(yáng)市","沅江市"]);
dsy.add("0_12_10",["道縣","東安縣","江華瑤族自治縣","江永縣","藍(lán)山縣","寧遠(yuǎn)縣","祁陽(yáng)縣","雙牌縣","新田縣","永州市"]);
dsy.add("0_12_11",["華容縣","臨湘市","平江縣","湘陰縣","岳陽(yáng)市","岳陽(yáng)縣","汨羅市"]);
dsy.add("0_12_12",["慈利縣","桑植縣","張家界市"]);
dsy.add("0_12_13",["茶陵縣","炎陵縣","株洲市","株洲縣","攸縣","醴陵市"]);
dsy.add("0_13",["白城","白山","長(zhǎng)春","吉林","遼源","四平","松原","通化","延邊朝鮮族自治州"]);
dsy.add("0_13_0",["白城市","大安市","通榆縣","鎮(zhèn)賚縣","洮南市"]);
dsy.add("0_13_1",["白山市","長(zhǎng)白朝鮮族自治縣","撫松縣","江源縣","靖宇縣","臨江市"]);
dsy.add("0_13_2",["長(zhǎng)春市","德惠市","九臺(tái)市","農(nóng)安縣","榆樹(shù)市"]);
dsy.add("0_13_3",["吉林市","磐石市","舒蘭市","永吉縣","樺甸市","蛟河市"]);
dsy.add("0_13_4",["東豐縣","東遼縣","遼源市"]);
dsy.add("0_13_5",["公主嶺市","梨樹(shù)縣","雙遼市","四平市","伊通滿族自治縣"]);
dsy.add("0_13_6",["長(zhǎng)嶺縣","扶余縣","乾安縣","前郭爾羅斯蒙古族自治縣","松原市"]);
dsy.add("0_13_7",["輝南縣","集安市","柳河縣","梅河口市","通化市","通化縣"]);
dsy.add("0_13_8",["安圖縣","敦化市","和龍市","龍井市","圖們市","汪清縣","延吉市","琿春市"]);
dsy.add("0_14",["常州","淮安","連云港","南京","南通","蘇州","宿遷","泰州","無(wú)錫","徐州","鹽城","揚(yáng)州","鎮(zhèn)江"]);
dsy.add("0_14_0",["常州市","金壇市","溧陽(yáng)市"]);
dsy.add("0_14_1",["洪澤縣","淮安市","金湖縣","漣水縣","盱眙縣"]);
dsy.add("0_14_2",["東??h","贛榆縣","灌南縣","灌云縣","連云港市"]);
dsy.add("0_14_3",["高淳縣","南京市","溧水縣"]);
dsy.add("0_14_4",["海安縣","海門(mén)市","南通市","啟東市","如東縣","如皋市","通州市"]);
dsy.add("0_14_5",["常熟市","昆山市","蘇州市","太倉(cāng)市","吳江市","張家港市"]);
dsy.add("0_14_6",["宿遷市","宿豫縣","沭陽(yáng)縣","泗洪縣","泗陽(yáng)縣"]);
dsy.add("0_14_7",["姜堰市","靖江市","泰興市","泰州市","興化市"]);
dsy.add("0_14_8",["江陰市","無(wú)錫市","宜興市"]);
dsy.add("0_14_9",["豐縣","沛縣","銅山縣","新沂市","徐州市","邳州市","睢寧縣"]);
dsy.add("0_14_10",["濱??h","大豐市","東臺(tái)市","阜寧縣","建湖縣","射陽(yáng)縣","響水縣","鹽城市","鹽都縣"]);
dsy.add("0_14_11",["寶應(yīng)縣","高郵市","江都市","揚(yáng)州市","儀征市"]);
dsy.add("0_14_12",["丹陽(yáng)市","句容市","揚(yáng)中市","鎮(zhèn)江市"]);
dsy.add("0_15",["撫州","贛州","吉安","景德鎮(zhèn)","九江","南昌","萍鄉(xiāng)","上饒","新余","宜春","鷹潭"]);
dsy.add("0_15_0",["崇仁縣","東鄉(xiāng)縣","撫州市","廣昌縣","金溪縣","樂(lè)安縣","黎川縣","南城縣","南豐縣","宜黃縣","資溪縣"]);
dsy.add("0_15_1",["安遠(yuǎn)縣","崇義縣","大余縣","定南縣","贛縣","贛州市","會(huì)昌縣","龍南縣","南康市","寧都縣","全南縣","瑞金市","上猶縣","石城縣","信豐縣","興國(guó)縣","尋烏縣","于都縣"]);
dsy.add("0_15_2",["安??h","吉安市","吉安縣","吉水縣","井岡山市","遂川縣","泰和縣","萬(wàn)安縣","峽江縣","新干縣","永豐縣","永新縣"]);
dsy.add("0_15_3",["浮梁縣","景德鎮(zhèn)市","樂(lè)平市"]);
dsy.add("0_15_4",["德安縣","都昌縣","湖口縣","九江市","九江縣","彭澤縣","瑞昌市","武寧縣","星子縣","修水縣","永修縣"]);
dsy.add("0_15_5",["安義縣","進(jìn)賢縣","南昌市","南昌縣","新建縣"]);
dsy.add("0_15_6",["蓮花縣","蘆溪縣","萍鄉(xiāng)市","上栗縣"]);
dsy.add("0_15_7",["波陽(yáng)縣","德興市","廣豐縣","橫峰縣","鉛山縣","上饒市","上饒縣","萬(wàn)年縣","余干縣","玉山縣","弋陽(yáng)縣","婺源縣"]);
dsy.add("0_15_8",["分宜縣","新余市"]);
dsy.add("0_15_9",["豐城市","奉新縣","高安市","靖安縣","上高縣","銅鼓縣","萬(wàn)載縣","宜春市","宜豐縣","樟樹(shù)市"]);
dsy.add("0_15_10",["貴溪市","鷹潭市","余江縣"]);
dsy.add("0_16",["鞍山","本溪","朝陽(yáng)","大連","丹東","撫順","阜新","葫蘆島","錦州","遼陽(yáng)","盤(pán)錦","沈陽(yáng)","鐵嶺","營(yíng)口"]);
dsy.add("0_16_0",["鞍山市","海城市","臺(tái)安縣","岫巖滿族自治縣"]);
dsy.add("0_16_1",["本溪滿族自治縣","本溪市","桓仁滿族自治縣"]);
dsy.add("0_16_2",["北票市","朝陽(yáng)市","朝陽(yáng)縣","建平縣","喀喇沁左翼蒙古族自治縣","凌源市"]);
dsy.add("0_16_3",["長(zhǎng)海縣","大連市","普蘭店市","瓦房店市","莊河市"]);
dsy.add("0_16_4",["丹東市","東港市","鳳城市","寬甸滿族自治縣"]);
dsy.add("0_16_5",["撫順市","撫順縣","清原滿族自治縣","新賓滿族自治縣"]);
dsy.add("0_16_6",["阜新蒙古族自治縣","阜新市","彰武縣"]);
dsy.add("0_16_7",["葫蘆島市","建昌縣","綏中縣","興城市"]);
dsy.add("0_16_8",["北寧市","黑山縣","錦州市","凌海市","義縣"]);
dsy.add("0_16_9",["燈塔市","遼陽(yáng)市","遼陽(yáng)縣"]);
dsy.add("0_16_10",["大洼縣","盤(pán)錦市","盤(pán)山縣"]);
dsy.add("0_16_11",["法庫(kù)縣","康平縣","遼中縣","沈陽(yáng)市","新民市"]);
dsy.add("0_16_12",["昌圖縣","調(diào)兵山市","開(kāi)原市","鐵嶺市","鐵嶺縣","西豐縣"]);
dsy.add("0_16_13",["大石橋市","蓋州市","營(yíng)口市"]);
dsy.add("0_17",["阿拉善盟","巴彥淖爾盟","包頭","赤峰","鄂爾多斯","呼和浩特","呼倫貝爾","通遼","烏海","烏蘭察布盟","錫林郭勒盟","興安盟"]);
dsy.add("0_17_0",["阿拉善右旗","阿拉善左旗","額濟(jì)納旗"]);
dsy.add("0_17_1",["杭錦后旗","臨河市","烏拉特后旗","烏拉特前旗","烏拉特中旗","五原縣","磴口縣"]);
dsy.add("0_17_2",["包頭市","達(dá)爾罕茂明安聯(lián)合旗","固陽(yáng)縣","土默特右旗"]);
dsy.add("0_17_3",["阿魯科爾沁旗","敖漢旗","巴林右旗","巴林左旗","赤峰市","喀喇沁旗","克什克騰旗","林西縣","寧城縣","翁牛特旗"]);
dsy.add("0_17_4",["達(dá)拉特旗","鄂爾多斯市","鄂托克旗","鄂托克前旗","杭錦旗","烏審旗","伊金霍洛旗","準(zhǔn)格爾旗"]);
dsy.add("0_17_5",["和林格爾縣","呼和浩特市","清水河縣","土默特左旗","托克托縣","武川縣"]);
dsy.add("0_17_6",["阿榮旗","陳巴爾虎旗","額爾古納市","鄂倫春自治旗","鄂溫克族自治旗","根河市","呼倫貝爾市","滿洲里市","莫力達(dá)瓦達(dá)斡爾族自治旗","新巴爾虎右旗","新巴爾虎左旗","牙克石市","扎蘭屯市"]);
dsy.add("0_17_7",["霍林郭勒市","開(kāi)魯縣","科爾沁左翼后旗","科爾沁左翼中旗","庫(kù)倫旗","奈曼旗","通遼市","扎魯特旗"]);
dsy.add("0_17_8",["烏海市"]);
dsy.add("0_17_9",["察哈爾右翼后旗","察哈爾右翼前旗","察哈爾右翼中旗","豐鎮(zhèn)市","化德縣","集寧市","涼城縣","商都縣","四子王旗","興和縣","卓資縣"]);
dsy.add("0_17_10",["阿巴嘎旗","東烏珠穆沁旗","多倫縣","二連浩特市","蘇尼特右旗","蘇尼特左旗","太仆寺旗","西烏珠穆沁旗","錫林浩特市","鑲黃旗","正藍(lán)旗","正鑲白旗"]);
dsy.add("0_17_11",["阿爾山市","科爾沁右翼前旗","科爾沁右翼中旗","突泉縣","烏蘭浩特市","扎賚特旗"]);
dsy.add("0_18",["固原","石嘴山","吳忠","銀川"]);
dsy.add("0_18_0",["固原市","海原縣","隆德縣","彭陽(yáng)縣","西吉縣","涇源縣"]);
dsy.add("0_18_1",["惠農(nóng)縣","平羅縣","石嘴山市","陶樂(lè)縣"]);
dsy.add("0_18_2",["青銅峽市","同心縣","吳忠市","鹽池縣","中寧縣","中衛(wèi)縣"]);
dsy.add("0_18_3",["賀蘭縣","靈武市","銀川市","永寧縣"]);
dsy.add("0_19",["果洛藏族自治州","海北藏族自治州","海東","海南藏族自治州","海西蒙古族藏族自治州","黃南藏族自治州","西寧","玉樹(shù)藏族自治州"]);
dsy.add("0_19_0",["班瑪縣","達(dá)日縣","甘德縣","久治縣","瑪多縣","瑪沁縣"]);
dsy.add("0_19_1",["剛察縣","海晏縣","門(mén)源回族自治縣","祁連縣"]);
dsy.add("0_19_2",["互助土族自治縣","化隆回族自治縣","樂(lè)都縣","民和回族土族自治縣","平安縣","循化撒拉族自治縣"]);
dsy.add("0_19_3",["共和縣","貴德縣","貴南縣","同德縣","興海縣"]);
dsy.add("0_19_4",["德令哈市","都蘭縣","格爾木市","天峻縣","烏蘭縣"]);
dsy.add("0_19_5",["河南蒙古族自治縣","尖扎縣","同仁縣","澤庫(kù)縣"]);
dsy.add("0_19_6",["大通回族土族自治縣","西寧市","湟源縣","湟中縣"]);
dsy.add("0_19_7",["稱(chēng)多縣","囊謙縣","曲麻萊縣","玉樹(shù)縣","雜多縣","治多縣"]);
dsy.add("0_20",["濱州","德州","東營(yíng)","菏澤","濟(jì)南","濟(jì)寧","萊蕪","聊城","臨沂","青島","日照","泰安","威海","濰坊","煙臺(tái)","棗莊","淄博"]);
dsy.add("0_20_0",["濱州市","博興縣","惠民縣","無(wú)棣縣","陽(yáng)信縣","沾化縣","鄒平縣"]);
dsy.add("0_20_1",["德州市","樂(lè)陵市","臨邑縣","陵縣","寧津縣","平原縣","齊河縣","慶云縣","武城縣","夏津縣","禹城市"]);
dsy.add("0_20_2",["東營(yíng)市","廣饒縣","墾利縣","利津縣"]);
dsy.add("0_20_3",["曹縣","成武縣","單縣","定陶縣","東明縣","菏澤市","巨野縣","鄆城縣","鄄城縣"]);
dsy.add("0_20_4",["濟(jì)南市","濟(jì)陽(yáng)縣","平陰縣","商河縣","章丘市"]);
dsy.add("0_20_5",["濟(jì)寧市","嘉祥縣","金鄉(xiāng)縣","梁山縣","曲阜市","微山縣","魚(yú)臺(tái)縣","鄒城市","兗州市","汶上縣","泗水縣"]);
dsy.add("0_20_6",["萊蕪市"]);
dsy.add("0_20_7",["東阿縣","高唐縣","冠縣","聊城市","臨清市","陽(yáng)谷縣","茌平縣","莘縣"]);
dsy.add("0_20_8",["蒼山縣","費(fèi)縣","臨沂市","臨沭縣","蒙陰縣","平邑縣","沂南縣","沂水縣","郯城縣","莒南縣"]);
dsy.add("0_20_9",["即墨市","膠南市","膠州市","萊西市","平度市","青島市"]);
dsy.add("0_20_10",["日照市","五蓮縣","莒縣"]);
dsy.add("0_20_11",["東平縣","肥城市","寧陽(yáng)縣","泰安市","新泰市"]);
dsy.add("0_20_12",["榮成市","乳山市","威海市","文登市"]);
dsy.add("0_20_13",["安丘市","昌樂(lè)縣","昌邑市","高密市","臨朐縣","青州市","壽光市","濰坊市","諸城市"]);
dsy.add("0_20_14",["長(zhǎng)島縣","海陽(yáng)市","萊陽(yáng)市","萊州市","龍口市","蓬萊市","棲霞市","煙臺(tái)市","招遠(yuǎn)市"]);
dsy.add("0_20_15",["棗莊市","滕州市"]);
dsy.add("0_20_16",["高青縣","桓臺(tái)縣","沂源縣","淄博市"]);
dsy.add("0_21",["長(zhǎng)治","大同","晉城","晉中","臨汾","呂梁","朔州","太原","忻州","陽(yáng)泉","運(yùn)城"]);
dsy.add("0_21_0",["長(zhǎng)治市","長(zhǎng)治縣","長(zhǎng)子縣","壺關(guān)縣","黎城縣","潞城市","平順縣","沁縣","沁源縣","屯留縣","武鄉(xiāng)縣","襄垣縣"]);
dsy.add("0_21_1",["大同市","大同縣","廣靈縣","渾源縣","靈丘縣","天鎮(zhèn)縣","陽(yáng)高縣","左云縣"]);
dsy.add("0_21_2",["高平市","晉城市","陵川縣","沁水縣","陽(yáng)城縣","澤州縣"]);
dsy.add("0_21_3",["和順縣","介休市","晉中市","靈石縣","平遙縣","祁縣","壽陽(yáng)縣","太谷縣","昔陽(yáng)縣","榆社縣","左權(quán)縣"]);
dsy.add("0_21_4",["安澤縣","大寧縣","汾西縣","浮山縣","古縣","洪洞縣","侯馬市","霍州市","吉縣","臨汾市","蒲縣","曲沃縣","襄汾縣","鄉(xiāng)寧縣","翼城縣","永和縣","隰縣"]);
dsy.add("0_21_5",["方山縣","汾陽(yáng)市","交城縣","交口縣","離石市","臨縣","柳林縣","石樓縣","文水縣","孝義市","興縣","中陽(yáng)縣","嵐縣"]);
dsy.add("0_21_6",["懷仁縣","山陰縣","朔州市","應(yīng)縣","右玉縣"]);
dsy.add("0_21_7",["古交市","婁煩縣","清徐縣","太原市","陽(yáng)曲縣"]);
dsy.add("0_21_8",["保德縣","代縣","定襄縣","繁峙縣","河曲縣","靜樂(lè)縣","寧武縣","偏關(guān)縣","神池縣","五臺(tái)縣","五寨縣","忻州市","原平市","岢嵐縣"]);
dsy.add("0_21_9",["平定縣","陽(yáng)泉市","盂縣"]);
dsy.add("0_21_10",["河津市","臨猗縣","平陸縣","萬(wàn)榮縣","聞喜縣","夏縣","新絳縣","永濟(jì)市","垣曲縣","運(yùn)城市","芮城縣","絳縣","稷山縣"]);
dsy.add("0_22",["安康","寶雞","漢中","商洛","銅川","渭南","西安","咸陽(yáng)","延安","榆林"]);
dsy.add("0_22_0",["安康市","白河縣","漢陰縣","寧陜縣","平利縣","石泉縣","旬陽(yáng)縣","鎮(zhèn)坪縣","紫陽(yáng)縣","嵐皋縣"]);
dsy.add("0_22_1",["寶雞市","寶雞縣","鳳縣","鳳翔縣","扶風(fēng)縣","隴縣","眉縣","千陽(yáng)縣","太白縣","岐山縣","麟游縣"]);
dsy.add("0_22_2",["城固縣","佛坪縣","漢中市","留壩縣","略陽(yáng)縣","勉縣","南鄭縣","寧強(qiáng)縣","西鄉(xiāng)縣","洋縣","鎮(zhèn)巴縣"]);
dsy.add("0_22_3",["丹鳳縣","洛南縣","山陽(yáng)縣","商洛市","商南縣","鎮(zhèn)安縣","柞水縣"]);
dsy.add("0_22_4",["銅川市","宜君縣"]);
dsy.add("0_22_5",["白水縣","澄城縣","大荔縣","富平縣","韓城市","合陽(yáng)縣","華縣","華陰市","蒲城縣","渭南市","潼關(guān)縣"]);
dsy.add("0_22_6",["高陵縣","戶(hù)縣","藍(lán)田縣","西安市","周至縣"]);
dsy.add("0_22_7",["彬縣","長(zhǎng)武縣","淳化縣","禮泉縣","乾縣","三原縣","武功縣","咸陽(yáng)市","興平市","旬邑縣","永壽縣","涇陽(yáng)縣"]);
dsy.add("0_22_8",["安塞縣","富縣","甘泉縣","黃陵縣","黃龍縣","洛川縣","吳旗縣","延安市","延長(zhǎng)縣","延川縣","宜川縣","志丹縣","子長(zhǎng)縣"]);
dsy.add("0_22_9",["定邊縣","府谷縣","橫山縣","佳縣","靖邊縣","米脂縣","清澗縣","神木縣","綏德縣","吳堡縣","榆林市","子洲縣"]);
dsy.add("0_23",["上海"]);
dsy.add("0_23_0",["","崇明縣","上海市"]);
dsy.add("0_24",["阿壩藏族羌族自治州","巴中","成都","達(dá)州","德陽(yáng)","甘孜藏族自治州","廣安","廣元","樂(lè)山","涼山彝族自治州","眉山","綿陽(yáng)","南充","內(nèi)江","攀枝花","遂寧","雅安","宜賓","資陽(yáng)","自貢","瀘州"]);
dsy.add("0_24_0",["阿壩縣","黑水縣","紅原縣","金川縣","九寨溝縣","理縣","馬爾康縣","茂縣","壤塘縣","若爾蓋縣","松潘縣","小金縣","汶川縣"]);
dsy.add("0_24_1",["巴中市","南江縣","平昌縣","通江縣"]);
dsy.add("0_24_2",["成都市","崇州市","大邑縣","都江堰市","金堂縣","彭州市","蒲江縣","雙流縣","新津縣","邛崍市","郫縣"]);
dsy.add("0_24_3",["達(dá)縣","達(dá)州市","大竹縣","開(kāi)江縣","渠縣","萬(wàn)源市","宣漢縣"]);
dsy.add("0_24_4",["德陽(yáng)市","廣漢市","羅江縣","綿竹市","什邡市","中江縣"]);
dsy.add("0_24_5",["巴塘縣","白玉縣","丹巴縣","稻城縣","道孚縣","德格縣","得榮縣","甘孜縣","九龍縣","康定縣","理塘縣","爐霍縣","色達(dá)縣","石渠縣","鄉(xiāng)城縣","新龍縣","雅江縣","瀘定縣"]);
dsy.add("0_24_6",["廣安市","華鎣市","鄰水縣","武勝縣","岳池縣"]);
dsy.add("0_24_7",["蒼溪縣","廣元市","劍閣縣","青川縣","旺蒼縣"]);
dsy.add("0_24_8",["峨邊彝族自治縣","峨眉山市","夾江縣","井研縣","樂(lè)山市","馬邊彝族自治縣","沐川縣","犍為縣"]);
dsy.add("0_24_9",["布拖縣","德昌縣","甘洛縣","會(huì)東縣","會(huì)理縣","金陽(yáng)縣","雷波縣","美姑縣","冕寧縣","木里藏族自治縣","寧南縣","普格縣","西昌市","喜德縣","鹽源縣","越西縣","昭覺(jué)縣"]);
dsy.add("0_24_10",["丹棱縣","洪雅縣","眉山市","彭山縣","青神縣","仁壽縣"]);
dsy.add("0_24_11",["安縣","北川縣","江油市","綿陽(yáng)市","平武縣","三臺(tái)縣","鹽亭縣","梓潼縣"]);
dsy.add("0_24_12",["南部縣","南充市","蓬安縣","西充縣","儀隴縣","營(yíng)山縣","閬中市"]);
dsy.add("0_24_13",["隆昌縣","內(nèi)江市","威遠(yuǎn)縣","資中縣"]);
dsy.add("0_24_14",["米易縣","攀枝花市","鹽邊縣"]);
dsy.add("0_24_15",["大英縣","蓬溪縣","射洪縣","遂寧市"]);
dsy.add("0_24_16",["寶興縣","漢源縣","蘆山縣","名山縣","石棉縣","天全縣","雅安市","滎經(jīng)縣"]);
dsy.add("0_24_17",["長(zhǎng)寧縣","高縣","江安縣","南溪縣","屏山縣","興文縣","宜賓市","宜賓縣","珙縣","筠連縣"]);
dsy.add("0_24_18",["安岳縣","簡(jiǎn)陽(yáng)市","樂(lè)至縣","資陽(yáng)市"]);
dsy.add("0_24_19",["富順縣","榮縣","自貢市"]);
dsy.add("0_24_20",["古藺縣","合江縣","敘永縣","瀘縣","瀘州市"]);
dsy.add("0_25",["天津"]);
dsy.add("0_25_0",["","薊縣","靜??h","寧河縣","天津市"]);
dsy.add("0_26",["阿里","昌都","拉薩","林芝","那曲","日喀則","山南"]);
dsy.add("0_26_0",["措勤縣","噶爾縣","改則縣","革吉縣","普蘭縣","日土縣","札達(dá)縣"]);
dsy.add("0_26_1",["八宿縣","邊壩縣","察雅縣","昌都縣","丁青縣","貢覺(jué)縣","江達(dá)縣","類(lèi)烏齊縣","洛隆縣","芒康縣","左貢縣"]);
dsy.add("0_26_2",["達(dá)孜縣","當(dāng)雄縣","堆龍德慶縣","拉薩市","林周縣","墨竹工卡縣","尼木縣","曲水縣"]);
dsy.add("0_26_3",["波密縣","察隅縣","工布江達(dá)縣","朗縣","林芝縣","米林縣","墨脫縣"]);
dsy.add("0_26_4",["安多縣","巴青縣","班戈縣","比如縣","嘉黎縣","那曲縣","尼瑪縣","聶榮縣","申扎縣","索縣"]);
dsy.add("0_26_5",["昂仁縣","白朗縣","定結(jié)縣","定日縣","崗巴縣","吉隆縣","江孜縣","康馬縣","拉孜縣","南木林縣","聶拉木縣","仁布縣","日喀則市","薩嘎縣","薩迦縣","謝通門(mén)縣","亞?wèn)|縣","仲巴縣"]);
dsy.add("0_26_6",["措美縣","錯(cuò)那縣","貢嘎縣","加查縣","浪卡子縣","隆子縣","洛扎縣","乃東縣","瓊結(jié)縣","曲松縣","桑日縣","扎囊縣"]);
dsy.add("0_27",["阿克蘇","阿拉爾","巴音郭楞蒙古自治州","博爾塔拉蒙古自治州","昌吉回族自治州","哈密","和田","喀什","克拉瑪依","克孜勒蘇柯?tīng)柨俗巫灾沃?quot;,"石河子","圖木舒克","吐魯番","烏魯木齊","五家渠","伊犁哈薩克自治州"]);
dsy.add("0_27_0",["阿克蘇市","阿瓦提縣","拜城縣","柯坪縣","庫(kù)車(chē)縣","沙雅縣","溫宿縣","烏什縣","新和縣"]);
dsy.add("0_27_1",["阿拉爾市"]);
dsy.add("0_27_2",["博湖縣","和靜縣","和碩縣","庫(kù)爾勒市","輪臺(tái)縣","且末縣","若羌縣","尉犁縣","焉耆回族自治縣"]);
dsy.add("0_27_3",["博樂(lè)市","精河縣","溫泉縣"]);
dsy.add("0_27_4",["昌吉市","阜康市","呼圖壁縣","吉木薩爾縣","瑪納斯縣","米泉市","木壘哈薩克自治縣","奇臺(tái)縣"]);
dsy.add("0_27_5",["巴里坤哈薩克自治縣","哈密市","伊吾縣"]);
dsy.add("0_27_6",["策勒縣","和田市","和田縣","洛浦縣","民豐縣","墨玉縣","皮山縣","于田縣"]);
dsy.add("0_27_7",["巴楚縣","喀什市","麥蓋提縣","莎車(chē)縣","疏附縣","疏勒縣","塔什庫(kù)爾干塔吉克自治縣","葉城縣","英吉沙縣","岳普湖縣","澤普縣","伽師縣"]);
dsy.add("0_27_8",["克拉瑪依市"]);
dsy.add("0_27_9",["阿合奇縣","阿克陶縣","阿圖什市","烏恰縣"]);
dsy.add("0_27_10",["石河子市"]);
dsy.add("0_27_11",["圖木舒克市"]);
dsy.add("0_27_12",["吐魯番市","托克遜縣","鄯善縣"]);
dsy.add("0_27_13",["烏魯木齊市","烏魯木齊縣"]);
dsy.add("0_27_14",["五家渠市"]);
dsy.add("0_27_15",["阿勒泰市","布爾津縣","察布查爾錫伯自治縣","額敏縣","福海縣","富蘊(yùn)縣","鞏留縣","哈巴河縣","和布克賽爾蒙古自治縣","霍城縣","吉木乃縣","奎屯市","尼勒克縣","青河縣","沙灣縣","塔城市","特克斯縣","托里縣","烏蘇市","新源縣","伊寧市","伊寧縣","裕民縣","昭蘇縣"]);
dsy.add("0_28",["保山","楚雄彝族自治州","大理白族自治州","德宏傣族景頗族自治州","迪慶藏族自治州","紅河哈尼族彝族自治州","昆明","麗江","臨滄","怒江傈傈族自治州","曲靖","思茅","文山壯族苗族自治州","西雙版納傣族自治州","玉溪","昭通"]);
dsy.add("0_28_0",["保山市","昌寧縣","龍陵縣","施甸縣","騰沖縣"]);
dsy.add("0_28_1",["楚雄市","大姚縣","祿豐縣","牟定縣","南華縣","雙柏縣","武定縣","姚安縣","永仁縣","元謀縣"]);
dsy.add("0_28_2",["賓川縣","大理市","洱源縣","鶴慶縣","劍川縣","彌渡縣","南澗彝族自治縣","巍山彝族回族自治縣","祥云縣","漾濞彝族自治縣","永平縣","云龍縣"]);
dsy.add("0_28_3",["梁河縣","隴川縣","潞西市","瑞麗市","盈江縣"]);
dsy.add("0_28_4",["德欽縣","維西傈僳族自治縣","香格里拉縣"]);
dsy.add("0_28_5",["個(gè)舊市","河口瑤族自治縣","紅河縣","建水縣","金平苗族瑤族傣族自治縣","開(kāi)遠(yuǎn)市","綠春縣","蒙自縣","彌勒縣","屏邊苗族自治縣","石屏縣","元陽(yáng)縣","瀘西縣"]);
dsy.add("0_28_6",["安寧市","呈貢縣","富民縣","晉寧縣","昆明市","祿勸彝族苗族自治縣","石林彝族自治縣","尋甸回族自治縣","宜良縣","嵩明縣"]);
dsy.add("0_28_7",["華坪縣","麗江市","寧蒗彝族自治縣","永勝縣","玉龍納西族自治縣"]);
dsy.add("0_28_8",["滄源佤族自治縣","鳳慶縣","耿馬傣族佤族治縣","臨滄縣","雙江拉祜族佤族布朗族傣族自治縣","永德縣","云縣","鎮(zhèn)康縣"]);
dsy.add("0_28_9",["福貢縣","貢山獨(dú)龍族怒族自治縣","蘭坪白族普米族自治縣","瀘水縣"]);
dsy.add("0_28_10",["富源縣","會(huì)澤縣","陸良縣","羅平縣","馬龍縣","曲靖市","師宗縣","宣威市","沾益縣"]);
dsy.add("0_28_11",["江城哈尼族彝族自治縣","景東彝族自治縣","景谷彝族傣族自治縣","瀾滄拉祜族自治縣","孟連傣族拉祜族佤族自治縣","墨江哈尼族自治縣","普洱哈尼族彝族自治縣","思茅市","西盟佤族自治縣","鎮(zhèn)沅彝族哈尼族拉祜族自治縣"]);
dsy.add("0_28_12",["富寧縣","廣南縣","麻栗坡縣","馬關(guān)縣","丘北縣","文山縣","西疇縣","硯山縣"]);
dsy.add("0_28_13",["景洪市","勐??h","勐臘縣"]);
dsy.add("0_28_14",["澄江縣","峨山彝族自治縣","華寧縣","江川縣","通海縣","新平彝族傣族自治縣","易門(mén)縣","玉溪市","元江哈尼族彝族傣族自治縣"]);
dsy.add("0_28_15",["大關(guān)縣","魯?shù)榭h","巧家縣","水富縣","綏江縣","威信縣","鹽津縣","彝良縣","永善縣","昭通市","鎮(zhèn)雄縣"]);
dsy.add("0_29",["杭州","湖州","嘉興","金華","麗水","寧波","紹興","臺(tái)州","溫州","舟山","衢州"]);
dsy.add("0_29_0",["淳安縣","富陽(yáng)市","杭州市","建德市","臨安市","桐廬縣"]);
dsy.add("0_29_1",["安吉縣","長(zhǎng)興縣","德清縣","湖州市"]);
dsy.add("0_29_2",["海寧市","海鹽縣","嘉善縣","嘉興市","平湖市","桐鄉(xiāng)市"]);
dsy.add("0_29_3",["東陽(yáng)市","金華市","蘭溪市","磐安縣","浦江縣","武義縣","義烏市","永康市"]);
dsy.add("0_29_4",["景寧畬族自治縣","麗水市","龍泉市","青田縣","慶元縣","松陽(yáng)縣","遂昌縣","云和縣","縉云縣"]);
dsy.add("0_29_5",["慈溪市","奉化市","寧波市","寧??h","象山縣","余姚市"]);
dsy.add("0_29_6",["上虞市","紹興市","紹興縣","新昌縣","諸暨市","嵊州市"]);
dsy.add("0_29_7",["臨海市","三門(mén)縣","臺(tái)州市","天臺(tái)縣","溫嶺市","仙居縣","玉環(huán)縣"]);
dsy.add("0_29_8",["蒼南縣","洞頭縣","樂(lè)清市","平陽(yáng)縣","瑞安市","泰順縣","溫州市","文成縣","永嘉縣"]);
dsy.add("0_29_9",["舟山市","岱山縣","嵊泗縣"]);
dsy.add("0_29_10",["常山縣","江山市","開(kāi)化縣","龍游縣","衢州市"]);
dsy.add("0_30",["重慶"]);
dsy.add("0_30_0",["城口縣","大足縣","墊江縣","豐都縣","奉節(jié)縣","合川市","江津市","開(kāi)縣","梁平縣","南川市","彭水苗族土家族自治縣","榮昌縣","石柱土家族自治縣","銅梁縣","巫山縣","巫溪縣","武隆縣","秀山土家族苗族自治縣","永川市","酉陽(yáng)土家族苗族自治縣","云陽(yáng)縣","忠縣","重慶市","潼南縣","璧山縣","綦江縣"]);
var s=["province","city","county"];
var opt0 = ["省份","地級(jí)市","市、縣級(jí)市、縣"];
function setup()
{
for(i=0;i<s.length-1;i++)
 document.getElementById(s[i]).onchange=new Function("change("+(i+1)+")");
change(0);
}

2.Ex_Area.htm:

<!doctype html>
<html  class="ui-mobile">
  <head>
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三級(jí)聯(lián)動(dòng)</title> 
  <title>中國(guó)地區(qū)三級(jí)聯(lián)動(dòng)下拉菜單</title>
  <script type="text/javascript" src="area.js"></script>
</head>
<body>
  所在地:
  <select id="province" runat="server" name="province">
  </select>
  <select id="city" runat="server" name="city">
  </select>
  <select id="county" runat="server" name="city">
  </select>
  <!--js初始化函數(shù)-->
  <script type="text/javascript">
    setup()
  </script>
</body>
</html>

運(yùn)行效果圖如下:

JS如何實(shí)現(xiàn)經(jīng)典的中國(guó)地區(qū)三級(jí)聯(lián)動(dòng)下拉菜單功能

以上是“JS如何實(shí)現(xiàn)經(jīng)典的中國(guó)地區(qū)三級(jí)聯(lián)動(dòng)下拉菜單功能”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

js
AI