全国省市二级联动数据

2014-04-20 19:51  1465人阅读  评论 (0)
Tags: city

哎 每次都要写 在这记录一下 以后再也不写了

省市二级联动数据

{"p":["——","安徽","澳门","北京","重庆","福建","甘肃","广东","广西","贵州","海南","河北","河南","黑龙江","湖北","湖南","吉林","江苏","江西","辽宁","内蒙古","宁夏","青海","山东","山西","陕西","上海","四川","台湾","天津","西藏","香港","新疆","云南","浙江"],"c":[["——"],["——","安庆","蚌埠","亳州","巢湖","池州","滁州","阜阳","合肥","淮北","淮南","黄山","六安","马鞍山","宿州","铜陵","芜湖","宣城"],["——","花地玛堂区","圣安多尼堂区","大堂区","望德堂区","风顺堂区","氹仔","路环"],["——","昌平","朝阳","崇文","大兴","东城","房山","丰台","海淀","怀柔","门头沟","密云","平谷","石景山","顺义","通州","西城","宣武","延庆"],["——","巴南","北碚","璧山","长寿","城口","大渡口","大足","垫江","丰都","奉节","涪陵","合川","江北","江津","九龙坡","开县","梁平","南岸","南川","彭水","綦江","黔江","荣昌","沙坪坝","石柱","双桥","铜梁","潼南","万盛","万州","巫山","巫溪","武隆","秀山","永川","酉阳","渝北","渝中","云阳","忠县"],["——","福州","龙岩","南平","宁德","莆田","泉州","三明","厦门","漳州"],["——","白银","定西","甘南","嘉峪关","金昌","酒泉","兰州","临夏","陇南","平凉","庆阳","天水","武威","张掖"],["——","潮州","东莞","佛山","广州","河源","惠州","江门","揭阳","茂名","梅州","清远","汕头","汕尾","韶关","深圳","阳江","云浮","湛江","肇庆","中山","珠海"],["——","百色","北海","崇左","防城港","贵港","桂林","河池","贺州","来宾","柳州","南宁","钦州","梧州","玉林"],["——","安顺","毕节","贵阳","六盘水","黔东南","黔南","黔西南","铜仁","遵义"],["——","白沙","保亭","昌江","澄迈","儋州","定安","东方","海口","乐东","临高","陵水","南沙","琼海","琼中","三亚","屯昌","万宁","文昌","五指山","西沙","中沙"],["——","保定","沧州","承德","邯郸","衡水","廊坊","秦皇岛","石家庄","唐山","邢台","张家口"],["——","安阳","鹤壁","济源","焦作","开封","洛阳","漯河","南阳","平顶山","濮阳","三门峡","商丘","新乡","信阳","许昌","郑州","周口","驻马店"],["——","大庆","大兴安岭","哈尔滨","鹤岗","黑河","鸡西","佳木斯","牡丹江","七台河","齐齐哈尔","双鸭山","绥化","伊春"],["——","鄂州","恩施","黄冈","黄石","荆门","荆州","潜江","神农架","十堰","随州","天门","武汉","仙桃","咸宁","襄樊","孝感","宜昌"],["——","长沙","常德","郴州","衡阳","怀化","娄底","邵阳","湘潭","湘西","益阳","永州","岳阳","张家界","株洲"],["——","白城","白山","长春","吉林","辽源","四平","松原","通化","延边"],["——","常州","淮安","连云港","南京","南通","苏州","宿迁","泰州","无锡","徐州","盐城","扬州","镇江"],["——","抚州","赣州","吉安","景德镇","九江","南昌","萍乡","上饶","新余","宜春","鹰潭"],["——","鞍山","本溪","朝阳","大连","丹东","抚顺","阜新","葫芦岛","锦州","辽阳","盘锦","沈阳","铁岭","营口"],["——","阿拉善","巴彦淖尔","包头","赤峰","鄂尔多斯","呼和浩特","呼伦贝尔","通辽","乌海","乌兰察布","锡林郭勒","兴安"],["——","固原","石嘴山","吴忠","银川","中卫"],["——","果洛","海北","海东","海南","海西","黄南","西宁","玉树"],["——","滨州","德州","东营","菏泽","济南","济宁","莱芜","聊城","临沂","青岛","日照","泰安","威海","潍坊","烟台","枣庄","淄博"],["——","长治","大同","晋城","晋中","临汾","吕梁","朔州","太原","忻州","阳泉","运城"],["——","安康","宝鸡","汉中","商洛","铜川","渭南","西安","咸阳","延安","榆林"],["——","宝山","长宁","崇明","奉贤","虹口","黄浦","嘉定","金山","静安","卢湾","闵行","南汇","浦东新","普陀","青浦","松江","徐汇","杨浦","闸北"],["——","阿坝","巴中","成都","达州","德阳","甘孜","广安","广元","乐山","凉山","泸州","眉山","绵阳","内江","南充","攀枝花","遂宁","雅安","宜宾","资阳","自贡"],["——","高雄市","高雄县","花莲县","基隆市","嘉义市","嘉义县","苗栗县","南投县","澎湖县","屏东县","台北市","台北县","台东县","台南市","台南县","台中市","台中县","桃园县","新竹市","新竹县","宜兰县","云林县","彰化县"],["——","宝坻","北辰","大港","东丽","汉沽","和平","河北","河东","河西","红桥","蓟县","津南","静海","南开","宁河","塘沽","武清","西青"],["——","阿里","昌都","拉萨","林芝","那曲","日喀则","山南"],["——","中西区","东区","九龙城区","观塘区","南区","深水埗区","黄大仙区","湾仔区","油尖旺区","离岛区","葵青区","北区","西贡区","沙田区","屯门区","大埔区","荃湾区","元朗区"],["——","阿克苏","阿拉尔","阿勒泰","巴音郭楞","博尔塔拉","昌吉","哈密","和田","喀什","克拉玛依","克孜勒苏","石河子","塔城","图木舒克","吐鲁番","乌鲁木齐","五家渠","伊犁"],["——","保山","楚雄","大理","德宏","迪庆","红河","昆明","丽江","临沧","怒江","普洱","曲靖","文山","西双版纳","玉溪","昭通"],["——","杭州","湖州","嘉兴","金华","丽水","宁波","衢州","绍兴","台州","温州","舟山"]]}

省份

["——","安徽","澳门","北京","重庆","福建","甘肃","广东","广西","贵州","海南","河北","河南","黑龙江","湖北","湖南","吉林","江苏","江西","辽宁","内蒙古","宁夏","青海","山东","山西","陕西","上海","四川","台湾","天津","西藏","香港","新疆","云南","浙江"]

城市

["——","安徽","澳门","北京","重庆","福建","甘肃","广东","广西","贵州","海南","河北","河南","黑龙江","湖北","湖南","吉林","江苏","江西","辽宁","内蒙古","宁夏","青海","山东","山西","陕西","上海","四川","台湾","天津","西藏","香港","新疆","云南","浙江","安庆","蚌埠","亳州","巢湖","池州","滁州","阜阳","合肥","淮北","淮南","黄山","六安","马鞍山","宿州","铜陵","芜湖","宣城","花地玛堂区","圣安多尼堂区","大堂区","望德堂区","风顺堂区","氹仔","路环","昌平","朝阳","崇文","大兴","东城","房山","丰台","海淀","怀柔","门头沟","密云","平谷","石景山","顺义","通州","西城","宣武","延庆","巴南","北碚","璧山","长寿","城口","大渡口","大足","垫江","丰都","奉节","涪陵","合川","江北","江津","九龙坡","开县","梁平","南岸","南川","彭水","綦江","黔江","荣昌","沙坪坝","石柱","双桥","铜梁","潼南","万盛","万州","巫山","巫溪","武隆","秀山","永川","酉阳","渝北","渝中","云阳","忠县","福州","龙岩","南平","宁德","莆田","泉州","三明","厦门","漳州","白银","定西","甘南","嘉峪关","金昌","酒泉","兰州","临夏","陇南","平凉","庆阳","天水","武威","张掖","潮州","东莞","佛山","广州","河源","惠州","江门","揭阳","茂名","梅州","清远","汕头","汕尾","韶关","深圳","阳江","云浮","湛江","肇庆","中山","珠海","百色","北海","崇左","防城港","贵港","桂林","河池","贺州","来宾","柳州","南宁","钦州","梧州","玉林","安顺","毕节","贵阳","六盘水","黔东南","黔南","黔西南","铜仁","遵义","白沙","保亭","昌江","澄迈","儋州","定安","东方","海口","乐东","临高","陵水","南沙","琼海","琼中","三亚","屯昌","万宁","文昌","五指山","西沙","中沙","保定","沧州","承德","邯郸","衡水","廊坊","秦皇岛","石家庄","唐山","邢台","张家口","安阳","鹤壁","济源","焦作","开封","洛阳","漯河","南阳","平顶山","濮阳","三门峡","商丘","新乡","信阳","许昌","郑州","周口","驻马店","大庆","大兴安岭","哈尔滨","鹤岗","黑河","鸡西","佳木斯","牡丹江","七台河","齐齐哈尔","双鸭山","绥化","伊春","鄂州","恩施","黄冈","黄石","荆门","荆州","潜江","神农架","十堰","随州","天门","武汉","仙桃","咸宁","襄樊","孝感","宜昌","长沙","常德","郴州","衡阳","怀化","娄底","邵阳","湘潭","湘西","益阳","永州","岳阳","张家界","株洲","白城","白山","长春","吉林","辽源","四平","松原","通化","延边","常州","淮安","连云港","南京","南通","苏州","宿迁","泰州","无锡","徐州","盐城","扬州","镇江","抚州","赣州","吉安","景德镇","九江","南昌","萍乡","上饶","新余","宜春","鹰潭","鞍山","本溪","朝阳","大连","丹东","抚顺","阜新","葫芦岛","锦州","辽阳","盘锦","沈阳","铁岭","营口","阿拉善","巴彦淖尔","包头","赤峰","鄂尔多斯","呼和浩特","呼伦贝尔","通辽","乌海","乌兰察布","锡林郭勒","兴安","固原","石嘴山","吴忠","银川","中卫","果洛","海北","海东","海南","海西","黄南","西宁","玉树","滨州","德州","东营","菏泽","济南","济宁","莱芜","聊城","临沂","青岛","日照","泰安","威海","潍坊","烟台","枣庄","淄博","长治","大同","晋城","晋中","临汾","吕梁","朔州","太原","忻州","阳泉","运城","安康","宝鸡","汉中","商洛","铜川","渭南","西安","咸阳","延安","榆林","宝山","长宁","崇明","奉贤","虹口","黄浦","嘉定","金山","静安","卢湾","闵行","南汇","浦东新","普陀","青浦","松江","徐汇","杨浦","闸北","阿坝","巴中","成都","达州","德阳","甘孜","广安","广元","乐山","凉山","泸州","眉山","绵阳","内江","南充","攀枝花","遂宁","雅安","宜宾","资阳","自贡","高雄市","高雄县","花莲县","基隆市","嘉义市","嘉义县","苗栗县","南投县","澎湖县","屏东县","台北市","台北县","台东县","台南市","台南县","台中市","台中县","桃园县","新竹市","新竹县","宜兰县","云林县","彰化县","宝坻","北辰","大港","东丽","汉沽","和平","河北","河东","河西","红桥","蓟县","津南","静海","南开","宁河","塘沽","武清","西青","阿里","昌都","拉萨","林芝","那曲","日喀则","山南","中西区","东区","九龙城区","观塘区","南区","深水埗区","黄大仙区","湾仔区","油尖旺区","离岛区","葵青区","北区","西贡区","沙田区","屯门区","大埔区","荃湾区","元朗区","阿克苏","阿拉尔","阿勒泰","巴音郭楞","博尔塔拉","昌吉","哈密","和田","喀什","克拉玛依","克孜勒苏","石河子","塔城","图木舒克","吐鲁番","乌鲁木齐","五家渠","伊犁","保山","楚雄","大理","德宏","迪庆","红河","昆明","丽江","临沧","怒江","普洱","曲靖","文山","西双版纳","玉溪","昭通","杭州","湖州","嘉兴","金华","丽水","宁波","衢州","绍兴","台州","温州","舟山"]

省市分割

[0,35,52,59,77,117,126,140,161,175,184,205,216,234,247,264,278,287,300,311,325,337,342,350,367,378,388,407,428,451,469,476,494,512,528,539]

城市对应的省份

[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,30,30,30,30,30,30,30,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,34,34,34,34,34,34,34,34,34,34,34]

名称对应id

{"安徽":1,"澳门":2,"北京":3,"重庆":4,"福建":5,"甘肃":6,"广东":7,"广西":8,"贵州":9,"海南":345,"河北":457,"河南":12,"黑龙江":13,"湖北":14,"湖南":15,"吉林":281,"江苏":17,"江西":18,"辽宁":19,"内蒙古":20,"宁夏":21,"青海":22,"山东":23,"山西":24,"陕西":25,"上海":26,"四川":27,"台湾":28,"天津":29,"西藏":30,"香港":31,"新疆":32,"云南":33,"浙江":34,"安庆":35,"蚌埠":36,"亳州":37,"巢湖":38,"池州":39,"滁州":40,"阜阳":41,"合肥":42,"淮北":43,"淮南":44,"黄山":45,"六安":46,"马鞍山":47,"宿州":48,"铜陵":49,"芜湖":50,"宣城":51,"花地玛堂区":52,"圣安多尼堂区":53,"大堂区":54,"望德堂区":55,"风顺堂区":56,"氹仔":57,"路环":58,"昌平":59,"朝阳":313,"崇文":61,"大兴":62,"东城":63,"房山":64,"丰台":65,"海淀":66,"怀柔":67,"门头沟":68,"密云":69,"平谷":70,"石景山":71,"顺义":72,"通州":73,"西城":74,"宣武":75,"延庆":76,"巴南":77,"北碚":78,"璧山":79,"长寿":80,"城口":81,"大渡口":82,"大足":83,"垫江":84,"丰都":85,"奉节":86,"涪陵":87,"合川":88,"江北":89,"江津":90,"九龙坡":91,"开县":92,"梁平":93,"南岸":94,"南川":95,"彭水":96,"綦江":97,"黔江":98,"荣昌":99,"沙坪坝":100,"石柱":101,"双桥":102,"铜梁":103,"潼南":104,"万盛":105,"万州":106,"巫山":107,"巫溪":108,"武隆":109,"秀山":110,"永川":111,"酉阳":112,"渝北":113,"渝中":114,"云阳":115,"忠县":116,"福州":117,"龙岩":118,"南平":119,"宁德":120,"莆田":121,"泉州":122,"三明":123,"厦门":124,"漳州":125,"白银":126,"定西":127,"甘南":128,"嘉峪关":129,"金昌":130,"酒泉":131,"兰州":132,"临夏":133,"陇南":134,"平凉":135,"庆阳":136,"天水":137,"武威":138,"张掖":139,"潮州":140,"东莞":141,"佛山":142,"广州":143,"河源":144,"惠州":145,"江门":146,"揭阳":147,"茂名":148,"梅州":149,"清远":150,"汕头":151,"汕尾":152,"韶关":153,"深圳":154,"阳江":155,"云浮":156,"湛江":157,"肇庆":158,"中山":159,"珠海":160,"百色":161,"北海":162,"崇左":163,"防城港":164,"贵港":165,"桂林":166,"河池":167,"贺州":168,"来宾":169,"柳州":170,"南宁":171,"钦州":172,"梧州":173,"玉林":174,"安顺":175,"毕节":176,"贵阳":177,"六盘水":178,"黔东南":179,"黔南":180,"黔西南":181,"铜仁":182,"遵义":183,"白沙":184,"保亭":185,"昌江":186,"澄迈":187,"儋州":188,"定安":189,"东方":190,"海口":191,"乐东":192,"临高":193,"陵水":194,"南沙":195,"琼海":196,"琼中":197,"三亚":198,"屯昌":199,"万宁":200,"文昌":201,"五指山":202,"西沙":203,"中沙":204,"保定":205,"沧州":206,"承德":207,"邯郸":208,"衡水":209,"廊坊":210,"秦皇岛":211,"石家庄":212,"唐山":213,"邢台":214,"张家口":215,"安阳":216,"鹤壁":217,"济源":218,"焦作":219,"开封":220,"洛阳":221,"漯河":222,"南阳":223,"平顶山":224,"濮阳":225,"三门峡":226,"商丘":227,"新乡":228,"信阳":229,"许昌":230,"郑州":231,"周口":232,"驻马店":233,"大庆":234,"大兴安岭":235,"哈尔滨":236,"鹤岗":237,"黑河":238,"鸡西":239,"佳木斯":240,"牡丹江":241,"七台河":242,"齐齐哈尔":243,"双鸭山":244,"绥化":245,"伊春":246,"鄂州":247,"恩施":248,"黄冈":249,"黄石":250,"荆门":251,"荆州":252,"潜江":253,"神农架":254,"十堰":255,"随州":256,"天门":257,"武汉":258,"仙桃":259,"咸宁":260,"襄樊":261,"孝感":262,"宜昌":263,"长沙":264,"常德":265,"郴州":266,"衡阳":267,"怀化":268,"娄底":269,"邵阳":270,"湘潭":271,"湘西":272,"益阳":273,"永州":274,"岳阳":275,"张家界":276,"株洲":277,"白城":278,"白山":279,"长春":280,"辽源":282,"四平":283,"松原":284,"通化":285,"延边":286,"常州":287,"淮安":288,"连云港":289,"南京":290,"南通":291,"苏州":292,"宿迁":293,"泰州":294,"无锡":295,"徐州":296,"盐城":297,"扬州":298,"镇江":299,"抚州":300,"赣州":301,"吉安":302,"景德镇":303,"九江":304,"南昌":305,"萍乡":306,"上饶":307,"新余":308,"宜春":309,"鹰潭":310,"鞍山":311,"本溪":312,"大连":314,"丹东":315,"抚顺":316,"阜新":317,"葫芦岛":318,"锦州":319,"辽阳":320,"盘锦":321,"沈阳":322,"铁岭":323,"营口":324,"阿拉善":325,"巴彦淖尔":326,"包头":327,"赤峰":328,"鄂尔多斯":329,"呼和浩特":330,"呼伦贝尔":331,"通辽":332,"乌海":333,"乌兰察布":334,"锡林郭勒":335,"兴安":336,"固原":337,"石嘴山":338,"吴忠":339,"银川":340,"中卫":341,"果洛":342,"海北":343,"海东":344,"海西":346,"黄南":347,"西宁":348,"玉树":349,"滨州":350,"德州":351,"东营":352,"菏泽":353,"济南":354,"济宁":355,"莱芜":356,"聊城":357,"临沂":358,"青岛":359,"日照":360,"泰安":361,"威海":362,"潍坊":363,"烟台":364,"枣庄":365,"淄博":366,"长治":367,"大同":368,"晋城":369,"晋中":370,"临汾":371,"吕梁":372,"朔州":373,"太原":374,"忻州":375,"阳泉":376,"运城":377,"安康":378,"宝鸡":379,"汉中":380,"商洛":381,"铜川":382,"渭南":383,"西安":384,"咸阳":385,"延安":386,"榆林":387,"宝山":388,"长宁":389,"崇明":390,"奉贤":391,"虹口":392,"黄浦":393,"嘉定":394,"金山":395,"静安":396,"卢湾":397,"闵行":398,"南汇":399,"浦东新":400,"普陀":401,"青浦":402,"松江":403,"徐汇":404,"杨浦":405,"闸北":406,"阿坝":407,"巴中":408,"成都":409,"达州":410,"德阳":411,"甘孜":412,"广安":413,"广元":414,"乐山":415,"凉山":416,"泸州":417,"眉山":418,"绵阳":419,"内江":420,"南充":421,"攀枝花":422,"遂宁":423,"雅安":424,"宜宾":425,"资阳":426,"自贡":427,"高雄市":428,"高雄县":429,"花莲县":430,"基隆市":431,"嘉义市":432,"嘉义县":433,"苗栗县":434,"南投县":435,"澎湖县":436,"屏东县":437,"台北市":438,"台北县":439,"台东县":440,"台南市":441,"台南县":442,"台中市":443,"台中县":444,"桃园县":445,"新竹市":446,"新竹县":447,"宜兰县":448,"云林县":449,"彰化县":450,"宝坻":451,"北辰":452,"大港":453,"东丽":454,"汉沽":455,"和平":456,"河东":458,"河西":459,"红桥":460,"蓟县":461,"津南":462,"静海":463,"南开":464,"宁河":465,"塘沽":466,"武清":467,"西青":468,"阿里":469,"昌都":470,"拉萨":471,"林芝":472,"那曲":473,"日喀则":474,"山南":475,"中西区":476,"东区":477,"九龙城区":478,"观塘区":479,"南区":480,"深水埗区":481,"黄大仙区":482,"湾仔区":483,"油尖旺区":484,"离岛区":485,"葵青区":486,"北区":487,"西贡区":488,"沙田区":489,"屯门区":490,"大埔区":491,"荃湾区":492,"元朗区":493,"阿克苏":494,"阿拉尔":495,"阿勒泰":496,"巴音郭楞":497,"博尔塔拉":498,"昌吉":499,"哈密":500,"和田":501,"喀什":502,"克拉玛依":503,"克孜勒苏":504,"石河子":505,"塔城":506,"图木舒克":507,"吐鲁番":508,"乌鲁木齐":509,"五家渠":510,"伊犁":511,"保山":512,"楚雄":513,"大理":514,"德宏":515,"迪庆":516,"红河":517,"昆明":518,"丽江":519,"临沧":520,"怒江":521,"普洱":522,"曲靖":523,"文山":524,"西双版纳":525,"玉溪":526,"昭通":527,"杭州":528,"湖州":529,"嘉兴":530,"金华":531,"丽水":532,"宁波":533,"衢州":534,"绍兴":535,"台州":536,"温州":537,"舟山":538}

数据库

CREATE TABLE `blog`.`city` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `pid` INT NOT NULL,
  `name` VARCHAR(6) NOT NULL,
  PRIMARY KEY (`id`))
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;

INSERT INTO city VALUES
(1,0,'安徽'),(2,0,'澳门'),(3,0,'北京'),(4,0,'重庆'),(5,0,'福建'),(6,0,'甘肃'),(7,0,'广东'),(8,0,'广西'),(9,0,'贵州'),(10,0,'海南'),(11,0,'河北'),(12,0,'河南'),(13,0,'黑龙江'),(14,0,'湖北'),(15,0,'湖南'),(16,0,'吉林'),(17,0,'江苏'),(18,0,'江西'),(19,0,'辽宁'),(20,0,'内蒙古'),(21,0,'宁夏'),(22,0,'青海'),(23,0,'山东'),(24,0,'山西'),(25,0,'陕西'),(26,0,'上海'),(27,0,'四川'),(28,0,'台湾'),(29,0,'天津'),(30,0,'西藏'),(31,0,'香港'),(32,0,'新疆'),(33,0,'云南'),(34,0,'浙江'),
(35,1,'安庆'),(36,1,'蚌埠'),(37,1,'亳州'),(38,1,'巢湖'),(39,1,'池州'),(40,1,'滁州'),(41,1,'阜阳'),(42,1,'合肥'),(43,1,'淮北'),(44,1,'淮南'),(45,1,'黄山'),(46,1,'六安'),(47,1,'马鞍山'),(48,1,'宿州'),(49,1,'铜陵'),(50,1,'芜湖'),(51,1,'宣城'),
(52,2,'花地玛堂区'),(53,2,'圣安多尼堂区'),(54,2,'大堂区'),(55,2,'望德堂区'),(56,2,'风顺堂区'),(57,2,'氹仔'),(58,2,'路环'),
(59,3,'昌平'),(60,3,'朝阳'),(61,3,'崇文'),(62,3,'大兴'),(63,3,'东城'),(64,3,'房山'),(65,3,'丰台'),(66,3,'海淀'),(67,3,'怀柔'),(68,3,'门头沟'),(69,3,'密云'),(70,3,'平谷'),(71,3,'石景山'),(72,3,'顺义'),(73,3,'通州'),(74,3,'西城'),(75,3,'宣武'),(76,3,'延庆'),
(77,4,'巴南'),(78,4,'北碚'),(79,4,'璧山'),(80,4,'长寿'),(81,4,'城口'),(82,4,'大渡口'),(83,4,'大足'),(84,4,'垫江'),(85,4,'丰都'),(86,4,'奉节'),(87,4,'涪陵'),(88,4,'合川'),(89,4,'江北'),(90,4,'江津'),(91,4,'九龙坡'),(92,4,'开县'),(93,4,'梁平'),(94,4,'南岸'),(95,4,'南川'),(96,4,'彭水'),(97,4,'綦江'),(98,4,'黔江'),(99,4,'荣昌'),(100,4,'沙坪坝'),(101,4,'石柱'),(102,4,'双桥'),(103,4,'铜梁'),(104,4,'潼南'),(105,4,'万盛'),(106,4,'万州'),(107,4,'巫山'),(108,4,'巫溪'),(109,4,'武隆'),(110,4,'秀山'),(111,4,'永川'),(112,4,'酉阳'),(113,4,'渝北'),(114,4,'渝中'),(115,4,'云阳'),(116,4,'忠县'),
(117,5,'福州'),(118,5,'龙岩'),(119,5,'南平'),(120,5,'宁德'),(121,5,'莆田'),(122,5,'泉州'),(123,5,'三明'),(124,5,'厦门'),(125,5,'漳州'),
(126,6,'白银'),(127,6,'定西'),(128,6,'甘南'),(129,6,'嘉峪关'),(130,6,'金昌'),(131,6,'酒泉'),(132,6,'兰州'),(133,6,'临夏'),(134,6,'陇南'),(135,6,'平凉'),(136,6,'庆阳'),(137,6,'天水'),(138,6,'武威'),(139,6,'张掖'),
(140,7,'潮州'),(141,7,'东莞'),(142,7,'佛山'),(143,7,'广州'),(144,7,'河源'),(145,7,'惠州'),(146,7,'江门'),(147,7,'揭阳'),(148,7,'茂名'),(149,7,'梅州'),(150,7,'清远'),(151,7,'汕头'),(152,7,'汕尾'),(153,7,'韶关'),(154,7,'深圳'),(155,7,'阳江'),(156,7,'云浮'),(157,7,'湛江'),(158,7,'肇庆'),(159,7,'中山'),(160,7,'珠海'),
(161,8,'百色'),(162,8,'北海'),(163,8,'崇左'),(164,8,'防城港'),(165,8,'贵港'),(166,8,'桂林'),(167,8,'河池'),(168,8,'贺州'),(169,8,'来宾'),(170,8,'柳州'),(171,8,'南宁'),(172,8,'钦州'),(173,8,'梧州'),(174,8,'玉林'),
(175,9,'安顺'),(176,9,'毕节'),(177,9,'贵阳'),(178,9,'六盘水'),(179,9,'黔东南'),(180,9,'黔南'),(181,9,'黔西南'),(182,9,'铜仁'),(183,9,'遵义'),
(184,10,'白沙'),(185,10,'保亭'),(186,10,'昌江'),(187,10,'澄迈'),(188,10,'儋州'),(189,10,'定安'),(190,10,'东方'),(191,10,'海口'),(192,10,'乐东'),(193,10,'临高'),(194,10,'陵水'),(195,10,'南沙'),(196,10,'琼海'),(197,10,'琼中'),(198,10,'三亚'),(199,10,'屯昌'),(200,10,'万宁'),(201,10,'文昌'),(202,10,'五指山'),(203,10,'西沙'),(204,10,'中沙'),
(205,11,'保定'),(206,11,'沧州'),(207,11,'承德'),(208,11,'邯郸'),(209,11,'衡水'),(210,11,'廊坊'),(211,11,'秦皇岛'),(212,11,'石家庄'),(213,11,'唐山'),(214,11,'邢台'),(215,11,'张家口'),
(216,12,'安阳'),(217,12,'鹤壁'),(218,12,'济源'),(219,12,'焦作'),(220,12,'开封'),(221,12,'洛阳'),(222,12,'漯河'),(223,12,'南阳'),(224,12,'平顶山'),(225,12,'濮阳'),(226,12,'三门峡'),(227,12,'商丘'),(228,12,'新乡'),(229,12,'信阳'),(230,12,'许昌'),(231,12,'郑州'),(232,12,'周口'),(233,12,'驻马店'),
(234,13,'大庆'),(235,13,'大兴安岭'),(236,13,'哈尔滨'),(237,13,'鹤岗'),(238,13,'黑河'),(239,13,'鸡西'),(240,13,'佳木斯'),(241,13,'牡丹江'),(242,13,'七台河'),(243,13,'齐齐哈尔'),(244,13,'双鸭山'),(245,13,'绥化'),(246,13,'伊春'),
(247,14,'鄂州'),(248,14,'恩施'),(249,14,'黄冈'),(250,14,'黄石'),(251,14,'荆门'),(252,14,'荆州'),(253,14,'潜江'),(254,14,'神农架'),(255,14,'十堰'),(256,14,'随州'),(257,14,'天门'),(258,14,'武汉'),(259,14,'仙桃'),(260,14,'咸宁'),(261,14,'襄樊'),(262,14,'孝感'),(263,14,'宜昌'),
(264,15,'长沙'),(265,15,'常德'),(266,15,'郴州'),(267,15,'衡阳'),(268,15,'怀化'),(269,15,'娄底'),(270,15,'邵阳'),(271,15,'湘潭'),(272,15,'湘西'),(273,15,'益阳'),(274,15,'永州'),(275,15,'岳阳'),(276,15,'张家界'),(277,15,'株洲'),
(278,16,'白城'),(279,16,'白山'),(280,16,'长春'),(281,16,'吉林'),(282,16,'辽源'),(283,16,'四平'),(284,16,'松原'),(285,16,'通化'),(286,16,'延边'),
(287,17,'常州'),(288,17,'淮安'),(289,17,'连云港'),(290,17,'南京'),(291,17,'南通'),(292,17,'苏州'),(293,17,'宿迁'),(294,17,'泰州'),(295,17,'无锡'),(296,17,'徐州'),(297,17,'盐城'),(298,17,'扬州'),(299,17,'镇江'),
(300,18,'抚州'),(301,18,'赣州'),(302,18,'吉安'),(303,18,'景德镇'),(304,18,'九江'),(305,18,'南昌'),(306,18,'萍乡'),(307,18,'上饶'),(308,18,'新余'),(309,18,'宜春'),(310,18,'鹰潭'),
(311,19,'鞍山'),(312,19,'本溪'),(313,19,'朝阳'),(314,19,'大连'),(315,19,'丹东'),(316,19,'抚顺'),(317,19,'阜新'),(318,19,'葫芦岛'),(319,19,'锦州'),(320,19,'辽阳'),(321,19,'盘锦'),(322,19,'沈阳'),(323,19,'铁岭'),(324,19,'营口'),
(325,20,'阿拉善'),(326,20,'巴彦淖尔'),(327,20,'包头'),(328,20,'赤峰'),(329,20,'鄂尔多斯'),(330,20,'呼和浩特'),(331,20,'呼伦贝尔'),(332,20,'通辽'),(333,20,'乌海'),(334,20,'乌兰察布'),(335,20,'锡林郭勒'),(336,20,'兴安'),
(337,21,'固原'),(338,21,'石嘴山'),(339,21,'吴忠'),(340,21,'银川'),(341,21,'中卫'),
(342,22,'果洛'),(343,22,'海北'),(344,22,'海东'),(345,22,'海南'),(346,22,'海西'),(347,22,'黄南'),(348,22,'西宁'),(349,22,'玉树'),
(350,23,'滨州'),(351,23,'德州'),(352,23,'东营'),(353,23,'菏泽'),(354,23,'济南'),(355,23,'济宁'),(356,23,'莱芜'),(357,23,'聊城'),(358,23,'临沂'),(359,23,'青岛'),(360,23,'日照'),(361,23,'泰安'),(362,23,'威海'),(363,23,'潍坊'),(364,23,'烟台'),(365,23,'枣庄'),(366,23,'淄博'),
(367,24,'长治'),(368,24,'大同'),(369,24,'晋城'),(370,24,'晋中'),(371,24,'临汾'),(372,24,'吕梁'),(373,24,'朔州'),(374,24,'太原'),(375,24,'忻州'),(376,24,'阳泉'),(377,24,'运城'),
(378,25,'安康'),(379,25,'宝鸡'),(380,25,'汉中'),(381,25,'商洛'),(382,25,'铜川'),(383,25,'渭南'),(384,25,'西安'),(385,25,'咸阳'),(386,25,'延安'),(387,25,'榆林'),
(388,26,'宝山'),(389,26,'长宁'),(390,26,'崇明'),(391,26,'奉贤'),(392,26,'虹口'),(393,26,'黄浦'),(394,26,'嘉定'),(395,26,'金山'),(396,26,'静安'),(397,26,'卢湾'),(398,26,'闵行'),(399,26,'南汇'),(400,26,'浦东新'),(401,26,'普陀'),(402,26,'青浦'),(403,26,'松江'),(404,26,'徐汇'),(405,26,'杨浦'),(406,26,'闸北'),
(407,27,'阿坝'),(408,27,'巴中'),(409,27,'成都'),(410,27,'达州'),(411,27,'德阳'),(412,27,'甘孜'),(413,27,'广安'),(414,27,'广元'),(415,27,'乐山'),(416,27,'凉山'),(417,27,'泸州'),(418,27,'眉山'),(419,27,'绵阳'),(420,27,'内江'),(421,27,'南充'),(422,27,'攀枝花'),(423,27,'遂宁'),(424,27,'雅安'),(425,27,'宜宾'),(426,27,'资阳'),(427,27,'自贡'),
(428,28,'高雄市'),(429,28,'高雄县'),(430,28,'花莲县'),(431,28,'基隆市'),(432,28,'嘉义市'),(433,28,'嘉义县'),(434,28,'苗栗县'),(435,28,'南投县'),(436,28,'澎湖县'),(437,28,'屏东县'),(438,28,'台北市'),(439,28,'台北县'),(440,28,'台东县'),(441,28,'台南市'),(442,28,'台南县'),(443,28,'台中市'),(444,28,'台中县'),(445,28,'桃园县'),(446,28,'新竹市'),(447,28,'新竹县'),(448,28,'宜兰县'),(449,28,'云林县'),(450,28,'彰化县'),
(451,29,'宝坻'),(452,29,'北辰'),(453,29,'大港'),(454,29,'东丽'),(455,29,'汉沽'),(456,29,'和平'),(457,29,'河北'),(458,29,'河东'),(459,29,'河西'),(460,29,'红桥'),(461,29,'蓟县'),(462,29,'津南'),(463,29,'静海'),(464,29,'南开'),(465,29,'宁河'),(466,29,'塘沽'),(467,29,'武清'),(468,29,'西青'),
(469,30,'阿里'),(470,30,'昌都'),(471,30,'拉萨'),(472,30,'林芝'),(473,30,'那曲'),(474,30,'日喀则'),(475,30,'山南'),
(476,31,'中西区'),(477,31,'东区'),(478,31,'九龙城区'),(479,31,'观塘区'),(480,31,'南区'),(481,31,'深水埗区'),(482,31,'黄大仙区'),(483,31,'湾仔区'),(484,31,'油尖旺区'),(485,31,'离岛区'),(486,31,'葵青区'),(487,31,'北区'),(488,31,'西贡区'),(489,31,'沙田区'),(490,31,'屯门区'),(491,31,'大埔区'),(492,31,'荃湾区'),(493,31,'元朗区'),
(494,32,'阿克苏'),(495,32,'阿拉尔'),(496,32,'阿勒泰'),(497,32,'巴音郭楞'),(498,32,'博尔塔拉'),(499,32,'昌吉'),(500,32,'哈密'),(501,32,'和田'),(502,32,'喀什'),(503,32,'克拉玛依'),(504,32,'克孜勒苏'),(505,32,'石河子'),(506,32,'塔城'),(507,32,'图木舒克'),(508,32,'吐鲁番'),(509,32,'乌鲁木齐'),(510,32,'五家渠'),(511,32,'伊犁'),
(512,33,'保山'),(513,33,'楚雄'),(514,33,'大理'),(515,33,'德宏'),(516,33,'迪庆'),(517,33,'红河'),(518,33,'昆明'),(519,33,'丽江'),(520,33,'临沧'),(521,33,'怒江'),(522,33,'普洱'),(523,33,'曲靖'),(524,33,'文山'),(525,33,'西双版纳'),(526,33,'玉溪'),(527,33,'昭通'),
(528,34,'杭州'),(529,34,'湖州'),(530,34,'嘉兴'),(531,34,'金华'),(532,34,'丽水'),(533,34,'宁波'),(534,34,'衢州'),(535,34,'绍兴'),(536,34,'台州'),(537,34,'温州'),(538,34,'舟山');

处理使用的js

var sheng_array = [];
var city_array = [];
var city_split = [0];
var city_to_province = [];
var name_to_id = {};
var sql = "INSERT INTO city VALUES\n";
var id = 0;
var city_data = {"p":["——","安徽","澳门","北京","重庆","福建","甘肃","广东","广西","贵州","海南","河北","河南","黑龙江","湖北","湖南","吉林","江苏","江西","辽宁","内蒙古","宁夏","青海","山东","山西","陕西","上海","四川","台湾","天津","西藏","香港","新疆","云南","浙江"],"c":[["——"],["——","安庆","蚌埠","亳州","巢湖","池州","滁州","阜阳","合肥","淮北","淮南","黄山","六安","马鞍山","宿州","铜陵","芜湖","宣城"],["——","花地玛堂区","圣安多尼堂区","大堂区","望德堂区","风顺堂区","氹仔","路环"],["——","昌平","朝阳","崇文","大兴","东城","房山","丰台","海淀","怀柔","门头沟","密云","平谷","石景山","顺义","通州","西城","宣武","延庆"],["——","巴南","北碚","璧山","长寿","城口","大渡口","大足","垫江","丰都","奉节","涪陵","合川","江北","江津","九龙坡","开县","梁平","南岸","南川","彭水","綦江","黔江","荣昌","沙坪坝","石柱","双桥","铜梁","潼南","万盛","万州","巫山","巫溪","武隆","秀山","永川","酉阳","渝北","渝中","云阳","忠县"],["——","福州","龙岩","南平","宁德","莆田","泉州","三明","厦门","漳州"],["——","白银","定西","甘南","嘉峪关","金昌","酒泉","兰州","临夏","陇南","平凉","庆阳","天水","武威","张掖"],["——","潮州","东莞","佛山","广州","河源","惠州","江门","揭阳","茂名","梅州","清远","汕头","汕尾","韶关","深圳","阳江","云浮","湛江","肇庆","中山","珠海"],["——","百色","北海","崇左","防城港","贵港","桂林","河池","贺州","来宾","柳州","南宁","钦州","梧州","玉林"],["——","安顺","毕节","贵阳","六盘水","黔东南","黔南","黔西南","铜仁","遵义"],["——","白沙","保亭","昌江","澄迈","儋州","定安","东方","海口","乐东","临高","陵水","南沙","琼海","琼中","三亚","屯昌","万宁","文昌","五指山","西沙","中沙"],["——","保定","沧州","承德","邯郸","衡水","廊坊","秦皇岛","石家庄","唐山","邢台","张家口"],["——","安阳","鹤壁","济源","焦作","开封","洛阳","漯河","南阳","平顶山","濮阳","三门峡","商丘","新乡","信阳","许昌","郑州","周口","驻马店"],["——","大庆","大兴安岭","哈尔滨","鹤岗","黑河","鸡西","佳木斯","牡丹江","七台河","齐齐哈尔","双鸭山","绥化","伊春"],["——","鄂州","恩施","黄冈","黄石","荆门","荆州","潜江","神农架","十堰","随州","天门","武汉","仙桃","咸宁","襄樊","孝感","宜昌"],["——","长沙","常德","郴州","衡阳","怀化","娄底","邵阳","湘潭","湘西","益阳","永州","岳阳","张家界","株洲"],["——","白城","白山","长春","吉林","辽源","四平","松原","通化","延边"],["——","常州","淮安","连云港","南京","南通","苏州","宿迁","泰州","无锡","徐州","盐城","扬州","镇江"],["——","抚州","赣州","吉安","景德镇","九江","南昌","萍乡","上饶","新余","宜春","鹰潭"],["——","鞍山","本溪","朝阳","大连","丹东","抚顺","阜新","葫芦岛","锦州","辽阳","盘锦","沈阳","铁岭","营口"],["——","阿拉善","巴彦淖尔","包头","赤峰","鄂尔多斯","呼和浩特","呼伦贝尔","通辽","乌海","乌兰察布","锡林郭勒","兴安"],["——","固原","石嘴山","吴忠","银川","中卫"],["——","果洛","海北","海东","海南","海西","黄南","西宁","玉树"],["——","滨州","德州","东营","菏泽","济南","济宁","莱芜","聊城","临沂","青岛","日照","泰安","威海","潍坊","烟台","枣庄","淄博"],["——","长治","大同","晋城","晋中","临汾","吕梁","朔州","太原","忻州","阳泉","运城"],["——","安康","宝鸡","汉中","商洛","铜川","渭南","西安","咸阳","延安","榆林"],["——","宝山","长宁","崇明","奉贤","虹口","黄浦","嘉定","金山","静安","卢湾","闵行","南汇","浦东新","普陀","青浦","松江","徐汇","杨浦","闸北"],["——","阿坝","巴中","成都","达州","德阳","甘孜","广安","广元","乐山","凉山","泸州","眉山","绵阳","内江","南充","攀枝花","遂宁","雅安","宜宾","资阳","自贡"],["——","高雄市","高雄县","花莲县","基隆市","嘉义市","嘉义县","苗栗县","南投县","澎湖县","屏东县","台北市","台北县","台东县","台南市","台南县","台中市","台中县","桃园县","新竹市","新竹县","宜兰县","云林县","彰化县"],["——","宝坻","北辰","大港","东丽","汉沽","和平","河北","河东","河西","红桥","蓟县","津南","静海","南开","宁河","塘沽","武清","西青"],["——","阿里","昌都","拉萨","林芝","那曲","日喀则","山南"],["——","中西区","东区","九龙城区","观塘区","南区","深水埗区","黄大仙区","湾仔区","油尖旺区","离岛区","葵青区","北区","西贡区","沙田区","屯门区","大埔区","荃湾区","元朗区"],["——","阿克苏","阿拉尔","阿勒泰","巴音郭楞","博尔塔拉","昌吉","哈密","和田","喀什","克拉玛依","克孜勒苏","石河子","塔城","图木舒克","吐鲁番","乌鲁木齐","五家渠","伊犁"],["——","保山","楚雄","大理","德宏","迪庆","红河","昆明","丽江","临沧","怒江","普洱","曲靖","文山","西双版纳","玉溪","昭通"],["——","杭州","湖州","嘉兴","金华","丽水","宁波","衢州","绍兴","台州","温州","舟山"]]};
for (var i = 0; i < city_data.p.length; i++) {
    var sheng = city_data.p[i];

    sheng_array.push(sheng);
    city_array.push(sheng);
    city_to_province.push(0);

    if (i == 0) {
        continue;
    }

    id++;
    sql += "("+id+",0,'"+sheng+"'),";
    name_to_id[sheng] = id;
}
sql += "\n";
for (var i = 0; i < city_data.p.length; i++) {
    if (i == 0) {
        continue;
    }
    city_split.push(id+1);

    var citys = city_data.c[i]; 
    for (var j = 0; j < citys.length; j++) {
        if (j == 0) {
            continue;
        }
        var city = citys[j];

        id++;
        sql += "("+id+","+i+",'"+city+"'),";
        city_array.push(city);
        city_to_province.push(i);
        name_to_id[city] = id;
    }
    sql += "\n";
}
city_split.push(city_array.length);
console.log(JSON.stringify(sheng_array));
console.log(JSON.stringify(city_array));
console.log(JSON.stringify(city_split));
console.log(JSON.stringify(city_to_province));
console.log(JSON.stringify(name_to_id));
console.log(sql);

二级联动页面

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="jquery-1.11.0.min.js"></script>
    <script type="text/javascript">
        var city = {cs:",安徽,澳门,北京,重庆,福建,甘肃,广东,广西,贵州,海南,河北,河南,黑龙江,湖北,湖南,吉林,江苏,江西,辽宁,内蒙古,宁夏,青海,山东,山西,陕西,上海,四川,台湾,天津,西藏,香港,新疆,云南,浙江,安庆,蚌埠,亳州,巢湖,池州,滁州,阜阳,合肥,淮北,淮南,黄山,六安,马鞍山,宿州,铜陵,芜湖,宣城,花地玛堂区,圣安多尼堂区,大堂区,望德堂区,风顺堂区,氹仔,路环,昌平,朝阳,崇文,大兴,东城,房山,丰台,海淀,怀柔,门头沟,密云,平谷,石景山,顺义,通州,西城,宣武,延庆,巴南,北碚,璧山,长寿,城口,大渡口,大足,垫江,丰都,奉节,涪陵,合川,江北,江津,九龙坡,开县,梁平,南岸,南川,彭水,綦江,黔江,荣昌,沙坪坝,石柱,双桥,铜梁,潼南,万盛,万州,巫山,巫溪,武隆,秀山,永川,酉阳,渝北,渝中,云阳,忠县,福州,龙岩,南平,宁德,莆田,泉州,三明,厦门,漳州,白银,定西,甘南,嘉峪关,金昌,酒泉,兰州,临夏,陇南,平凉,庆阳,天水,武威,张掖,潮州,东莞,佛山,广州,河源,惠州,江门,揭阳,茂名,梅州,清远,汕头,汕尾,韶关,深圳,阳江,云浮,湛江,肇庆,中山,珠海,百色,北海,崇左,防城港,贵港,桂林,河池,贺州,来宾,柳州,南宁,钦州,梧州,玉林,安顺,毕节,贵阳,六盘水,黔东南,黔南,黔西南,铜仁,遵义,白沙,保亭,昌江,澄迈,儋州,定安,东方,海口,乐东,临高,陵水,南沙,琼海,琼中,三亚,屯昌,万宁,文昌,五指山,西沙,中沙,保定,沧州,承德,邯郸,衡水,廊坊,秦皇岛,石家庄,唐山,邢台,张家口,安阳,鹤壁,济源,焦作,开封,洛阳,漯河,南阳,平顶山,濮阳,三门峡,商丘,新乡,信阳,许昌,郑州,周口,驻马店,大庆,大兴安岭,哈尔滨,鹤岗,黑河,鸡西,佳木斯,牡丹江,七台河,齐齐哈尔,双鸭山,绥化,伊春,鄂州,恩施,黄冈,黄石,荆门,荆州,潜江,神农架,十堰,随州,天门,武汉,仙桃,咸宁,襄樊,孝感,宜昌,长沙,常德,郴州,衡阳,怀化,娄底,邵阳,湘潭,湘西,益阳,永州,岳阳,张家界,株洲,白城,白山,长春,吉林,辽源,四平,松原,通化,延边,常州,淮安,连云港,南京,南通,苏州,宿迁,泰州,无锡,徐州,盐城,扬州,镇江,抚州,赣州,吉安,景德镇,九江,南昌,萍乡,上饶,新余,宜春,鹰潭,鞍山,本溪,朝阳,大连,丹东,抚顺,阜新,葫芦岛,锦州,辽阳,盘锦,沈阳,铁岭,营口,阿拉善,巴彦淖尔,包头,赤峰,鄂尔多斯,呼和浩特,呼伦贝尔,通辽,乌海,乌兰察布,锡林郭勒,兴安,固原,石嘴山,吴忠,银川,中卫,果洛,海北,海东,海南,海西,黄南,西宁,玉树,滨州,德州,东营,菏泽,济南,济宁,莱芜,聊城,临沂,青岛,日照,泰安,威海,潍坊,烟台,枣庄,淄博,长治,大同,晋城,晋中,临汾,吕梁,朔州,太原,忻州,阳泉,运城,安康,宝鸡,汉中,商洛,铜川,渭南,西安,咸阳,延安,榆林,宝山,长宁,崇明,奉贤,虹口,黄浦,嘉定,金山,静安,卢湾,闵行,南汇,浦东新,普陀,青浦,松江,徐汇,杨浦,闸北,阿坝,巴中,成都,达州,德阳,甘孜,广安,广元,乐山,凉山,泸州,眉山,绵阳,内江,南充,攀枝花,遂宁,雅安,宜宾,资阳,自贡,高雄市,高雄县,花莲县,基隆市,嘉义市,嘉义县,苗栗县,南投县,澎湖县,屏东县,台北市,台北县,台东县,台南市,台南县,台中市,台中县,桃园县,新竹市,新竹县,宜兰县,云林县,彰化县,宝坻,北辰,大港,东丽,汉沽,和平,河北,河东,河西,红桥,蓟县,津南,静海,南开,宁河,塘沽,武清,西青,阿里,昌都,拉萨,林芝,那曲,日喀则,山南,中西区,东区,九龙城区,观塘区,南区,深水埗区,黄大仙区,湾仔区,油尖旺区,离岛区,葵青区,北区,西贡区,沙田区,屯门区,大埔区,荃湾区,元朗区,阿克苏,阿拉尔,阿勒泰,巴音郭楞,博尔塔拉,昌吉,哈密,和田,喀什,克拉玛依,克孜勒苏,石河子,塔城,图木舒克,吐鲁番,乌鲁木齐,五家渠,伊犁,保山,楚雄,大理,德宏,迪庆,红河,昆明,丽江,临沧,怒江,普洱,曲靖,文山,西双版纳,玉溪,昭通,杭州,湖州,嘉兴,金华,丽水,宁波,衢州,绍兴,台州,温州,舟山",s:[0,35,52,59,77,117,126,140,161,175,184,205,216,234,247,264,278,287,300,311,325,337,342,350,367,378,388,407,428,451,469,476,494,512,528,539]};
    </script>
    <script type="text/javascript">
        $(function(){
            // 格式调整
            city.c = city.cs.split(',');

            // 初始化
            for (var i = 1; i < 35; i++) {
                $('#s').append('<option value="'+i+'">'+city.c[i]+'</option>');
            };
            for (var i = 35; i < 52; i++) {
                $('#c').append('<option value="'+i+'">'+city.c[i]+'</option>');
            };

            // 联动事件
            $('#s').change(function(){
                $('#c option:gt(0)').remove();
                if (this.value == '0') {
                    return;
                }
                var v = parseInt(this.value);
                for (var i = city.s[v], end = city.s[v+1]; i < end; i++) {
                    $('#c').append('<option value="'+i+'">'+city.c[i]+'</option>');
                };
            });

            // 选中
            $('#s').val(12).change();
            $('#c').val(231);
        });
    </script>
</head>
<body>
    <div><select id="s"><option value="0">——</option></select><select id="c"><option value="0">——</option></select></div>
</body>
</html>