省份与城市集连的脚本

function ProvinceChange()
{
    ClearCity();
    if (document.getElementById("Province").value.length>0 )
    {
        AddCity();
    }
}

function ClearCity()
{
    var i,j;
    j=document.getElementById("City").length;
    document.getElementById("City").selectedIndex=0;
    for(i=1;i<j;i++){
        // 有些浏览器不支持 options 属性的 remove 方法,
        // 但支持 DOM 的 removeChild 方法(比如:Konqueror)
        if(document.getElementById("City").options.remove){
            document.getElementById("City").remove(1);
        }
        else{
            document.getElementById("City").removeChild(document.getElementById("City").options[i])
        }
    }
}

function AddCity(theAddCity)
{
   
    var SecArray;
    var count=0;
    SecArray = new Array();
   
      SecArray[count] = new Array("福建","福州市");
      count+=1;
   
      SecArray[count] = new Array("福建","厦门市");
      count+=1;
   
      SecArray[count] = new Array("福建","莆田市");
      count+=1;
   
      SecArray[count] = new Array("福建","三明市");
      count+=1;
   
      SecArray[count] = new Array("福建","泉州市");
      count+=1;
   
      SecArray[count] = new Array("福建","漳州市");
      count+=1;
   
      SecArray[count] = new Array("福建","南平市");
      count+=1;
   
      SecArray[count] = new Array("福建","龙岩市");
      count+=1;
   
      SecArray[count] = new Array("福建","宁德地区");
      count+=1;
   
      SecArray[count] = new Array("湖北","武汉市");
      count+=1;
   
      SecArray[count] = new Array("湖北","黄石市");
      count+=1;
   
      SecArray[count] = new Array("湖北","十堰市");
      count+=1;
   
      SecArray[count] = new Array("湖北","宜昌市");
      count+=1;
   
      SecArray[count] = new Array("湖北","襄樊市");
      count+=1;
   
      SecArray[count] = new Array("湖北","鄂州市");
      count+=1;
   
      SecArray[count] = new Array("湖北","荆门市");
      count+=1;
   
      SecArray[count] = new Array("湖北","孝感市");
      count+=1;
   
      SecArray[count] = new Array("湖北","荆州市");
      count+=1;
   
      SecArray[count] = new Array("湖北","黄冈市");
      count+=1;
   
      SecArray[count] = new Array("湖北","咸宁市");
      count+=1;
   
      SecArray[count] = new Array("湖北","恩施土家族苗族自治州");
      count+=1;
   
      SecArray[count] = new Array("湖南","长沙市");
      count+=1;
   
      SecArray[count] = new Array("湖南","株洲市");
      count+=1;
   
      SecArray[count] = new Array("湖南","湘潭市");
      count+=1;
   
      SecArray[count] = new Array("湖南","衡阳市");
      count+=1;
   
      SecArray[count] = new Array("湖南","邵阳市");
      count+=1;
   
      SecArray[count] = new Array("湖南","岳阳市");
      count+=1;
   
      SecArray[count] = new Array("湖南","常德市");
      count+=1;
   
      SecArray[count] = new Array("湖南","张家界市");
      count+=1;
   
      SecArray[count] = new Array("湖南","益阳市");
      count+=1;
   
      SecArray[count] = new Array("湖南","郴州市");
      count+=1;
   
      SecArray[count] = new Array("湖南","永州市");
      count+=1;
   
      SecArray[count] = new Array("湖南","怀化市");
      count+=1;
   
      SecArray[count] = new Array("湖南","娄底地区");
      count+=1;
   
      SecArray[count] = new Array("湖南","湘西土家族苗族自治州");
      count+=1;
   
      SecArray[count] = new Array("北京","东城区");
      count+=1;
   
      SecArray[count] = new Array("北京","西城区");
      count+=1;
   
      SecArray[count] = new Array("北京","崇文区");
      count+=1;
   
      SecArray[count] = new Array("北京","宣武区");
      count+=1;
   
      SecArray[count] = new Array("北京","朝阳区");
      count+=1;
   
      SecArray[count] = new Array("北京","丰台区");
      count+=1;
   
      SecArray[count] = new Array("北京","石景山区");
      count+=1;
   
      SecArray[count] = new Array("北京","海淀区");
      count+=1;
   
      SecArray[count] = new Array("北京","门头沟区");
      count+=1;
   
      SecArray[count] = new Array("北京","房山区");
      count+=1;
   
      SecArray[count] = new Array("北京","通州区");
      count+=1;
   
      SecArray[count] = new Array("北京","顺义区");
      count+=1;
   
      SecArray[count] = new Array("北京","昌平区");
      count+=1;
   
      SecArray[count] = new Array("北京","大兴区");
      count+=1;
   
      SecArray[count] = new Array("北京","平谷区");
      count+=1;
   
      SecArray[count] = new Array("北京","怀柔区");
      count+=1;
   
      SecArray[count] = new Array("北京","密云县");
      count+=1;
   
      SecArray[count] = new Array("北京","延庆县");
      count+=1;
   
      SecArray[count] = new Array("四川","成都市");
      count+=1;
   
      SecArray[count] = new Array("四川","自贡市");
      count+=1;
   
      SecArray[count] = new Array("四川","攀枝花市");
      count+=1;
   
      SecArray[count] = new Array("四川","泸州市");
      count+=1;
   
      SecArray[count] = new Array("四川","德阳市");
      count+=1;
   
      SecArray[count] = new Array("四川","绵阳市");
      count+=1;
   
      SecArray[count] = new Array("四川","广元市");
      count+=1;
   
      SecArray[count] = new Array("四川","遂宁市");
      count+=1;
   
      SecArray[count] = new Array("四川","内江市");
      count+=1;
   
      SecArray[count] = new Array("四川","乐山市");
      count+=1;
   
      SecArray[count] = new Array("四川","南充市");
      count+=1;
   
      SecArray[count] = new Array("四川","宜宾市");
      count+=1;
   
      SecArray[count] = new Array("四川","广安市");
      count+=1;
   
      SecArray[count] = new Array("四川","达州地区");
      count+=1;
   
      SecArray[count] = new Array("四川","雅安地区");
      count+=1;
   
      SecArray[count] = new Array("四川","阿坝藏族羌族自治州");
      count+=1;
   
      SecArray[count] = new Array("四川","甘孜藏族自治州");
      count+=1;
   
      SecArray[count] = new Array("四川","凉山彝族自治州");
      count+=1;
   
      SecArray[count] = new Array("四川","巴中地区");
      count+=1;
   
      SecArray[count] = new Array("四川","眉山地区");
      count+=1;
   
      SecArray[count] = new Array("四川","资阳地区");
      count+=1;
   
      SecArray[count] = new Array("重庆","万州区");
      count+=1;
   
      SecArray[count] = new Array("重庆","涪陵区");
      count+=1;
   
      SecArray[count] = new Array("重庆","渝中区");
      count+=1;
   
      SecArray[count] = new Array("重庆","大渡口区");
      count+=1;
   
      SecArray[count] = new Array("重庆","江北区");
      count+=1;
   
      SecArray[count] = new Array("重庆","沙坪坝区");
      count+=1;
   
      SecArray[count] = new Array("重庆","九龙坡区");
      count+=1;
   
      SecArray[count] = new Array("重庆","南岸区");
      count+=1;
   
      SecArray[count] = new Array("重庆","北碚区");
      count+=1;
   
      SecArray[count] = new Array("重庆","万盛区");
      count+=1;
   
      SecArray[count] = new Array("重庆","双桥区");
      count+=1;
   
      SecArray[count] = new Array("重庆","渝北区");
      count+=1;
   
      SecArray[count] = new Array("重庆","巴南区");
      count+=1;
   
      SecArray[count] = new Array("重庆","长寿县");
      count+=1;
   
      SecArray[count] = new Array("重庆","綦江县");
      count+=1;
   
      SecArray[count] = new Array("重庆","潼南县");
      count+=1;
   
      SecArray[count] = new Array("重庆","铜梁县");
      count+=1;
   
      SecArray[count] = new Array("重庆","大足县");
      count+=1;
   
      SecArray[count] = new Array("重庆","荣昌县");
      count+=1;
   
      SecArray[count] = new Array("重庆","璧山县");
      count+=1;
   
      SecArray[count] = new Array("重庆","梁平县");
      count+=1;
   
      SecArray[count] = new Array("重庆","城口县");
      count+=1;
   
      SecArray[count] = new Array("重庆","丰都县");
      count+=1;
   
      SecArray[count] = new Array("重庆","垫江县");
      count+=1;
   
      SecArray[count] = new Array("重庆","武隆县");
      count+=1;
   
      SecArray[count] = new Array("重庆","忠县");
      count+=1;
   
      SecArray[count] = new Array("重庆","开县");
      count+=1;
   
      SecArray[count] = new Array("重庆","云阳县");
      count+=1;
   
      SecArray[count] = new Array("重庆","奉节县");
      count+=1;
   
      SecArray[count] = new Array("重庆","巫山县");
      count+=1;
   
      SecArray[count] = new Array("重庆","巫溪县");
      count+=1;
   
      SecArray[count] = new Array("重庆","黔江土家族苗族自治县");
      count+=1;
   
      SecArray[count] = new Array("重庆","石柱土家族自治县");
      count+=1;
   
      SecArray[count] = new Array("重庆","秀山土家族苗族自治县");
      count+=1;
   
      SecArray[count] = new Array("重庆","酉阳土家族苗族自治县");
      count+=1;
   
      SecArray[count] = new Array("重庆","彭水苗族土家族自治县");
      count+=1;
   
      SecArray[count] = new Array("重庆","江津市");
      count+=1;
   
      SecArray[count] = new Array("重庆","合川市");
      count+=1;
   
      SecArray[count] = new Array("重庆","永川市");
      count+=1;
   
      SecArray[count] = new Array("重庆","南川市");
      count+=1;
   
      SecArray[count] = new Array("山西","太原市");
      count+=1;
   
      SecArray[count] = new Array("山西","大同市");
      count+=1;
   
      SecArray[count] = new Array("山西","阳泉市");
      count+=1;
   
      SecArray[count] = new Array("山西","长治市");
      count+=1;
   
      SecArray[count] = new Array("山西","晋城市");
      count+=1;
   
      SecArray[count] = new Array("山西","朔州市");
      count+=1;
   
      SecArray[count] = new Array("山西","忻州地区");
      count+=1;
   
      SecArray[count] = new Array("山西","吕梁地区");
      count+=1;
   
      SecArray[count] = new Array("山西","晋中地区");
      count+=1;
   
      SecArray[count] = new Array("山西","临汾地区");
      count+=1;
   
      SecArray[count] = new Array("山西","运城地区");
      count+=1;
   
      SecArray[count] = new Array("陕西","西安市");
      count+=1;
   
      SecArray[count] = new Array("陕西","铜川市");
      count+=1;
   
      SecArray[count] = new Array("陕西","宝鸡市");
      count+=1;
   
      SecArray[count] = new Array("陕西","咸阳市");
      count+=1;
   
      SecArray[count] = new Array("陕西","渭南市");
      count+=1;
   
      SecArray[count] = new Array("陕西","延安市");
      count+=1;
   
      SecArray[count] = new Array("陕西","汉中市");
      count+=1;
   
      SecArray[count] = new Array("陕西","安康地区");
      count+=1;
   
      SecArray[count] = new Array("陕西","商洛地区");
      count+=1;
   
      SecArray[count] = new Array("陕西","榆林地区");
      count+=1;
   
      SecArray[count] = new Array("江西","南昌市");
      count+=1;
   
      SecArray[count] = new Array("江西","景德镇市");
      count+=1;
   
      SecArray[count] = new Array("江西","萍乡市");
      count+=1;
   
      SecArray[count] = new Array("江西","九江市");
      count+=1;
   
      SecArray[count] = new Array("江西","新余市");
      count+=1;
   
      SecArray[count] = new Array("江西","赣州市");
      count+=1;
   
      SecArray[count] = new Array("江西","宜春地区");
      count+=1;
   
      SecArray[count] = new Array("江西","上饶地区");
      count+=1;
   
      SecArray[count] = new Array("江西","吉安地区");
      count+=1;
   
      SecArray[count] = new Array("江西","抚州地区");
      count+=1;
   
      SecArray[count] = new Array("安徽","合肥市");
      count+=1;
   
      SecArray[count] = new Array("安徽","芜湖市");
      count+=1;
   
      SecArray[count] = new Array("安徽","蚌埠市");
      count+=1;
   
      SecArray[count] = new Array("安徽","淮南市");
      count+=1;
   
      SecArray[count] = new Array("安徽","马鞍山市");
      count+=1;
   
      SecArray[count] = new Array("安徽","淮北市");
      count+=1;
   
      SecArray[count] = new Array("安徽","铜陵市");
      count+=1;
   
      SecArray[count] = new Array("安徽","安庆市");
      count+=1;
   
      SecArray[count] = new Array("安徽","黄山市");
      count+=1;
   
      SecArray[count] = new Array("安徽","滁州市");
      count+=1;
   
      SecArray[count] = new Array("安徽","阜阳市");
      count+=1;
   
      SecArray[count] = new Array("安徽","宿州市");
      count+=1;
   
      SecArray[count] = new Array("安徽","六安地区");
      count+=1;
   
      SecArray[count] = new Array("安徽","宣城地区");
      count+=1;
   
      SecArray[count] = new Array("安徽","巢湖地区");
      count+=1;
   
      SecArray[count] = new Array("安徽","池州地区");
      count+=1;
   
      SecArray[count] = new Array("浙江","杭州市");
      count+=1;
   
      SecArray[count] = new Array("浙江","宁波市");
      count+=1;
   
      SecArray[count] = new Array("浙江","温州市");
      count+=1;
   
      SecArray[count] = new Array("浙江","嘉兴市");
      count+=1;
   
      SecArray[count] = new Array("浙江","湖州市");
      count+=1;
   
      SecArray[count] = new Array("浙江","绍兴市");
      count+=1;
   
      SecArray[count] = new Array("浙江","金华市");
      count+=1;
   
      SecArray[count] = new Array("浙江","衢州市");
      count+=1;
   
      SecArray[count] = new Array("浙江","舟山市");
      count+=1;
   
      SecArray[count] = new Array("浙江","台州市");
      count+=1;
   
      SecArray[count] = new Array("浙江","丽水地区");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","哈尔滨市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","齐齐哈尔市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","鸡西市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","鹤岗市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","双鸭山市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","大庆市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","伊春市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","佳木斯市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","七台河市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","牡丹江市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","黑河市");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","绥化地区");
      count+=1;
   
      SecArray[count] = new Array("黑龙江","大兴安岭地区");
      count+=1;
   
      SecArray[count] = new Array("吉林","长春市");
      count+=1;
   
      SecArray[count] = new Array("吉林","吉林市");
      count+=1;
   
      SecArray[count] = new Array("吉林","四平市");
      count+=1;
   
      SecArray[count] = new Array("吉林","辽源市");
      count+=1;
   
      SecArray[count] = new Array("吉林","通化市");
      count+=1;
   
      SecArray[count] = new Array("吉林","白山市");
      count+=1;
   
      SecArray[count] = new Array("吉林","松原市");
      count+=1;
   
      SecArray[count] = new Array("吉林","白城市");
      count+=1;
   
      SecArray[count] = new Array("吉林","延边朝鲜族自治州");
      count+=1;
   
      SecArray[count] = new Array("辽宁","沈阳市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","大连市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","鞍山市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","抚顺市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","本溪市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","丹东市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","锦州市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","营口市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","阜新市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","辽阳市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","盘锦市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","铁岭市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","朝阳市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","葫芦岛市");
      count+=1;
   
      SecArray[count] = new Array("辽宁","开原市");
      count+=1;
   
      SecArray[count] = new Array("山东","济南市");
      count+=1;
   
      SecArray[count] = new Array("山东","青岛市");
      count+=1;
   
      SecArray[count] = new Array("山东","淄博市");
      count+=1;
   
      SecArray[count] = new Array("山东","枣庄市");
      count+=1;
   
      SecArray[count] = new Array("山东","东营市");
      count+=1;
   
      SecArray[count] = new Array("山东","烟台市");
      count+=1;
   
      SecArray[count] = new Array("山东","潍坊市");
      count+=1;
   
      SecArray[count] = new Array("山东","济宁市");
      count+=1;
   
      SecArray[count] = new Array("山东","泰安市");
      count+=1;
   
      SecArray[count] = new Array("山东","威海市");
      count+=1;
   
      SecArray[count] = new Array("山东","日照市");
      count+=1;
   
      SecArray[count] = new Array("山东","莱芜市");
      count+=1;
   
      SecArray[count] = new Array("山东","临沂市");
      count+=1;
   
      SecArray[count] = new Array("山东","德州市");
      count+=1;
   
      SecArray[count] = new Array("山东","聊城市");
      count+=1;
   
      SecArray[count] = new Array("山东","滨州地区");
      count+=1;
   
      SecArray[count] = new Array("山东","荷泽地区");
      count+=1;
   
      SecArray[count] = new Array("天津","和平区");
      count+=1;
   
      SecArray[count] = new Array("天津","河东区");
      count+=1;
   
      SecArray[count] = new Array("天津","河西区");
      count+=1;
   
      SecArray[count] = new Array("天津","南开区");
      count+=1;
   
      SecArray[count] = new Array("天津","河北区");
      count+=1;
   
      SecArray[count] = new Array("天津","红桥区");
      count+=1;
   
      SecArray[count] = new Array("天津","塘沽区");
      count+=1;
   
      SecArray[count] = new Array("天津","汉沽区");
      count+=1;
   
      SecArray[count] = new Array("天津","大港区");
      count+=1;
   
      SecArray[count] = new Array("天津","东丽区");
      count+=1;
   
      SecArray[count] = new Array("天津","西青区");
      count+=1;
   
      SecArray[count] = new Array("天津","津南区");
      count+=1;
   
      SecArray[count] = new Array("天津","北辰区");
      count+=1;
   
      SecArray[count] = new Array("天津","宁河县");
      count+=1;
   
      SecArray[count] = new Array("天津","武清区");
      count+=1;
   
      SecArray[count] = new Array("天津","静海县");
      count+=1;
   
      SecArray[count] = new Array("天津","宝坻区");
      count+=1;
   
      SecArray[count] = new Array("天津","蓟县");
      count+=1;
   
      SecArray[count] = new Array("云南","昆明市");
      count+=1;
   
      SecArray[count] = new Array("云南","曲靖市");
      count+=1;
   
      SecArray[count] = new Array("云南","玉溪市");
      count+=1;
   
      SecArray[count] = new Array("云南","昭通地区");
      count+=1;
   
      SecArray[count] = new Array("云南","楚雄彝族自治州");
      count+=1;
   
      SecArray[count] = new Array("云南","红河哈尼族彝族自治州");
      count+=1;
   
      SecArray[count] = new Array("云南","文山壮族苗族自治州");
      count+=1;
   
      SecArray[count] = new Array("云南","思茅地区");
      count+=1;
   
      SecArray[count] = new Array("云南","西双版纳傣族自治州");
      count+=1;
   
      SecArray[count] = new Array("云南","大理白族自治州");
      count+=1;
   
      SecArray[count] = new Array("云南","保山地区");
      count+=1;
   
      SecArray[count] = new Array("云南","德宏傣族景颇族自治州");
      count+=1;
   
      SecArray[count] = new Array("云南","丽江地区");
      count+=1;
   
      SecArray[count] = new Array("云南","怒江傈僳族自治州");
      count+=1;
   
      SecArray[count] = new Array("云南","迪庆藏族自治州");
      count+=1;
   
      SecArray[count] = new Array("云南","临沧地区");
      count+=1;
   
      SecArray[count] = new Array("贵州","贵阳市");
      count+=1;
   
      SecArray[count] = new Array("贵州","六盘水市");
      count+=1;
   
      SecArray[count] = new Array("贵州","遵义市");
      count+=1;
   
      SecArray[count] = new Array("贵州","铜仁地区");
      count+=1;
   
      SecArray[count] = new Array("贵州","黔西南布依族苗族自治州");
      count+=1;
   
      SecArray[count] = new Array("贵州","毕节地区");
      count+=1;
   
      SecArray[count] = new Array("贵州","安顺地区");
      count+=1;
   
      SecArray[count] = new Array("贵州","黔东南苗族侗族自治州");
      count+=1;
   
      SecArray[count] = new Array("贵州","黔南布依族苗族自治州");
      count+=1;
   
      SecArray[count] = new Array("宁夏","银川市");
      count+=1;
   
      SecArray[count] = new Array("宁夏","石嘴山市");
      count+=1;
   
      SecArray[count] = new Array("宁夏","吴忠市");
      count+=1;
   
      SecArray[count] = new Array("宁夏","固原地区");
      count+=1;
   
      SecArray[count] = new Array("海南","海口市");
      count+=1;
   
      SecArray[count] = new Array("海南","三亚市");
      count+=1;
   
      SecArray[count] = new Array("甘肃","兰州市");
      count+=1;
   
      SecArray[count] = new Array("甘肃","嘉峪关市");
      count+=1;
   
      SecArray[count] = new Array("甘肃","金昌市");
      count+=1;
   
      SecArray[count] = new Array("甘肃","白银市");
      count+=1;
   
      SecArray[count] = new Array("甘肃","天水市");
      count+=1;
   
      SecArray[count] = new Array("甘肃","酒泉地区");
      count+=1;
   
      SecArray[count] = new Array("甘肃","张掖地区");
      count+=1;
   
      SecArray[count] = new Array("甘肃","武威地区");
      count+=1;
   
      SecArray[count] = new Array("甘肃","定西地区");
      count+=1;
   
      SecArray[count] = new Array("甘肃","陇南地区");
      count+=1;
   
      SecArray[count] = new Array("甘肃","平凉地区");
      count+=1;
   
      SecArray[count] = new Array("甘肃","庆阳地区");
      count+=1;
   
      SecArray[count] = new Array("甘肃","临夏回族自治州");
      count+=1;
   
      SecArray[count] = new Array("甘肃","甘南藏族自治州");
      count+=1;
   
      SecArray[count] = new Array("上海","黄浦区");
      count+=1;
   
      SecArray[count] = new Array("上海","卢湾区");
      count+=1;
   
      SecArray[count] = new Array("上海","徐汇区");
      count+=1;
   
      SecArray[count] = new Array("上海","长宁区");
      count+=1;
   
      SecArray[count] = new Array("上海","静安区");
      count+=1;
   
      SecArray[count] = new Array("上海","普陀区");
      count+=1;
   
      SecArray[count] = new Array("上海","闸北区");
      count+=1;
   
      SecArray[count] = new Array("上海","虹口区");
      count+=1;
   
      SecArray[count] = new Array("上海","杨浦区");
      count+=1;
   
      SecArray[count] = new Array("上海","闵行区");
      count+=1;
   
      SecArray[count] = new Array("上海","宝山区");
      count+=1;
   
      SecArray[count] = new Array("上海","嘉定区");
      count+=1;
   
      SecArray[count] = new Array("上海","浦东新区");
      count+=1;
   
      SecArray[count] = new Array("上海","金山区");
      count+=1;
   
      SecArray[count] = new Array("上海","松江区");
      count+=1;
   
      SecArray[count] = new Array("上海","南汇区");
      count+=1;
   
      SecArray[count] = new Array("上海","奉贤区");
      count+=1;
   
      SecArray[count] = new Array("上海","青浦区");
      count+=1;
   
      SecArray[count] = new Array("上海","崇明县");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","呼和浩特市");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","包头市");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","乌海市");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","赤峰市");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","呼伦贝尔盟");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","兴安盟");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","哲里木盟");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","锡林郭勒盟");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","乌兰察布盟");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","伊克昭盟");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","巴彦淖尔盟");
      count+=1;
   
      SecArray[count] = new Array("内蒙古","阿拉善盟");
      count+=1;
   
      SecArray[count] = new Array("广东","广州市");
      count+=1;
   
      SecArray[count] = new Array("广东","韶关市");
      count+=1;
   
      SecArray[count] = new Array("广东","深圳市");
      count+=1;
   
      SecArray[count] = new Array("广东","珠海市");
      count+=1;
   
      SecArray[count] = new Array("广东","汕头市");
      count+=1;
   
      SecArray[count] = new Array("广东","佛山市");
      count+=1;
   
      SecArray[count] = new Array("广东","江门市");
      count+=1;
   
      SecArray[count] = new Array("广东","湛江市");
      count+=1;
   
      SecArray[count] = new Array("广东","茂名市");
      count+=1;
   
      SecArray[count] = new Array("广东","肇庆市");
      count+=1;
   
      SecArray[count] = new Array("广东","惠州市");
      count+=1;
   
      SecArray[count] = new Array("广东","梅州市");
      count+=1;
   
      SecArray[count] = new Array("广东","汕尾市");
      count+=1;
   
      SecArray[count] = new Array("广东","河源市");
      count+=1;
   
      SecArray[count] = new Array("广东","阳江市");
      count+=1;
   
      SecArray[count] = new Array("广东","清远市");
      count+=1;
   
      SecArray[count] = new Array("广东","东莞市");
      count+=1;
   
      SecArray[count] = new Array("广东","中山市");
      count+=1;
   
      SecArray[count] = new Array("广东","潮州市");
      count+=1;
   
      SecArray[count] = new Array("广东","揭阳市");
      count+=1;
   
      SecArray[count] = new Array("广东","云浮市");
      count+=1;
   
      SecArray[count] = new Array("广西","南宁市");
      count+=1;
   
      SecArray[count] = new Array("广西","柳州市");
      count+=1;
   
      SecArray[count] = new Array("广西","桂林市");
      count+=1;
   
      SecArray[count] = new Array("广西","梧州市");
      count+=1;
   
      SecArray[count] = new Array("广西","北海市");
      count+=1;
   
      SecArray[count] = new Array("广西","防城港市");
      count+=1;
   
      SecArray[count] = new Array("广西","钦州市");
      count+=1;
   
      SecArray[count] = new Array("广西","贵港市");
      count+=1;
   
      SecArray[count] = new Array("广西","玉林市");
      count+=1;
   
      SecArray[count] = new Array("广西","南宁地区");
      count+=1;
   
      SecArray[count] = new Array("广西","柳州地区");
      count+=1;
   
      SecArray[count] = new Array("广西","贺州地区");
      count+=1;
   
      SecArray[count] = new Array("广西","百色地区");
      count+=1;
   
      SecArray[count] = new Array("广西","河池地区");
      count+=1;
   
      SecArray[count] = new Array("江苏","南京市");
      count+=1;
   
      SecArray[count] = new Array("江苏","无锡市");
      count+=1;
   
      SecArray[count] = new Array("江苏","徐州市");
      count+=1;
   
      SecArray[count] = new Array("江苏","常州市");
      count+=1;
   
      SecArray[count] = new Array("江苏","苏州市");
      count+=1;
   
      SecArray[count] = new Array("江苏","南通市");
      count+=1;
   
      SecArray[count] = new Array("江苏","连云港市");
      count+=1;
   
      SecArray[count] = new Array("江苏","淮阴市");
      count+=1;
   
      SecArray[count] = new Array("江苏","盐城市");
      count+=1;
   
      SecArray[count] = new Array("江苏","扬州市");
      count+=1;
   
      SecArray[count] = new Array("江苏","镇江市");
      count+=1;
   
      SecArray[count] = new Array("江苏","泰州市");
      count+=1;
   
      SecArray[count] = new Array("江苏","宿迁市");
      count+=1;
   
      SecArray[count] = new Array("河北","石家庄市");
      count+=1;
   
      SecArray[count] = new Array("河北","唐山市");
      count+=1;
   
      SecArray[count] = new Array("河北","秦皇岛市");
      count+=1;
   
      SecArray[count] = new Array("河北","邯郸市");
      count+=1;
   
      SecArray[count] = new Array("河北","邢台市");
      count+=1;
   
      SecArray[count] = new Array("河北","保定市");
      count+=1;
   
      SecArray[count] = new Array("河北","张家口市");
      count+=1;
   
      SecArray[count] = new Array("河北","承德市");
      count+=1;
   
      SecArray[count] = new Array("河北","沧州市");
      count+=1;
   
      SecArray[count] = new Array("河北","廊坊市");
      count+=1;
   
      SecArray[count] = new Array("河北","衡水市");
      count+=1;
   
      SecArray[count] = new Array("河南","郑州市");
      count+=1;
   
      SecArray[count] = new Array("河南","开封市");
      count+=1;
   
      SecArray[count] = new Array("河南","洛阳市");
      count+=1;
   
      SecArray[count] = new Array("河南","平顶山市");
      count+=1;
   
      SecArray[count] = new Array("河南","安阳市");
      count+=1;
   
      SecArray[count] = new Array("河南","鹤壁市");
      count+=1;
   
      SecArray[count] = new Array("河南","新乡市");
      count+=1;
   
      SecArray[count] = new Array("河南","焦作市");
      count+=1;
   
      SecArray[count] = new Array("河南","濮阳市");
      count+=1;
   
      SecArray[count] = new Array("河南","许昌市");
      count+=1;
   
      SecArray[count] = new Array("河南","漯河市");
      count+=1;
   
      SecArray[count] = new Array("河南","三门峡市");
      count+=1;
   
      SecArray[count] = new Array("河南","南阳市");
      count+=1;
   
      SecArray[count] = new Array("河南","商丘市");
      count+=1;
   
      SecArray[count] = new Array("河南","信阳市");
      count+=1;
   
      SecArray[count] = new Array("河南","周口地区");
      count+=1;
   
      SecArray[count] = new Array("河南","驻马店地区");
      count+=1;
   
   
    var i,curent;
    curent=1;
    var strProvince=document.getElementById("Province").value;
    for (i=0;i<count; i++)
    {
        if (SecArray[i][0] == strProvince )
        {
            //把名称和类别编号赋给下拉框
            // Option 中第一个为Text第二个为Value
            document.getElementById("City").options[curent]=new Option(SecArray[i][1], SecArray[i][1]);
            if(theAddCity != null){
                if(theAddCity == SecArray[i][1])
                    document.getElementById("City").options[curent].selected = true;
            }
            curent+=1;
        }     
    }
}

function  Provinceshow(myProvince,myCity){
   var showProvince = "北京|福建|安徽|浙江|上海|广东|广西|江苏|河北|河南|湖北|湖南|四川|重庆|山西|陕西|江西|黑龙江|吉林|辽宁|山东|天津|云南|贵州|宁夏|海南|甘肃|内蒙古";
   var N;
   var viewProvince;
   var insertNum=1;

   viewProvince = showProvince.split("|");
   for(N=0;N<viewProvince.length;N++){
       document.getElementById("Province").options[insertNum]=new Option(viewProvince[N], viewProvince[N]);
        if(myProvince != null){
            if(myProvince == viewProvince[N])
                document.getElementById("Province").options[insertNum].selected = true;
        }
        insertNum+=1;
       if (myCity != null)
       {
           ClearCity();
           AddCity(myCity);
       }
   }

 

<select name="province" id="Province" onChange="ProvinceChange()">
  <option value="北京">-请选择-</option>
</select>
<select  name="city" id="City">
  <option value="东城区">-请选择-</option>
</select>
        <!--<script>Provinceshow("北京","东城区");</script>-->  <!--无默认值-->
        <!--<script>Provinceshow("福建","泉州市");</script>--> <!--有默认值-->
<script>Provinceshow("<%=customerInfoActionForm.getProvince()%>","<%=customerInfoActionForm.getCity()%>");</script> <!--有默认值-->

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值