📄 selectcity.js
字号:
tCitys[24][10] = new Array('2411','四川德阳');
tCitys[24][11] = new Array('2499','四川其他城市');
tCitys[24][12] = new Array('2414','四川广安');
tCitys[24][13] = new Array('2415','四川达州');
tCitys[24][14] = new Array('2419','四川凉山(西昌)');
tCitys[24][15] = new Array('2420','四川阿坝(马尔康)');
tCitys[24][16] = new Array('2421','四川甘孜(康定)');
tCitys[24][17] = new Array('2412','四川广元');
tCitys[24][18] = new Array('2413','四川遂宁');
tCitys[24][19] = new Array('2416','四川巴中');
tCitys[24][20] = new Array('2417','四川雅安');
tCitys[24][21] = new Array('2418','四川眉山');
tCitys[25] = new Array;
tCitys[25][0] = new Array('2502','云南曲靖');
tCitys[25][1] = new Array('2503','云南玉溪');
tCitys[25][2] = new Array('2504','云南保山');
tCitys[25][3] = new Array('2506','云南思茅');
tCitys[25][4] = new Array('2501','云南昆明');
tCitys[25][5] = new Array('2505','云南昭通');
tCitys[25][6] = new Array('2507','云南临沧');
tCitys[25][7] = new Array('2599','云南其他城市');
tCitys[25][8] = new Array('2508','云南丽江');
tCitys[25][9] = new Array('2509','云南文山');
tCitys[25][10] = new Array('2511','云南景洪');
tCitys[25][11] = new Array('2512','云南楚雄');
tCitys[25][12] = new Array('2513','云南大理');
tCitys[25][13] = new Array('2514','云南潞西');
tCitys[25][14] = new Array('2515','云南泸水');
tCitys[25][15] = new Array('2510','云南个旧');
tCitys[25][16] = new Array('2516','云南香格里拉');
tCitys[26] = new Array;
tCitys[26][0] = new Array('2603','陕西渭南');
tCitys[26][1] = new Array('2604','陕西汉中');
tCitys[26][2] = new Array('2606','陕西铜川');
tCitys[26][3] = new Array('2699','陕西其他城市');
tCitys[26][4] = new Array('2601','陕西西安');
tCitys[26][5] = new Array('2602','陕西咸阳');
tCitys[26][6] = new Array('2605','陕西宝鸡');
tCitys[26][7] = new Array('2607','陕西延安');
tCitys[26][8] = new Array('2608','陕西榆林');
tCitys[26][9] = new Array('2609','陕西安康');
tCitys[26][10] = new Array('2610','陕西商洛');
tCitys[27] = new Array;
tCitys[27][0] = new Array('2701','甘肃兰州');
tCitys[27][1] = new Array('2703','甘肃天水');
tCitys[27][2] = new Array('2799','甘肃其他城市');
tCitys[27][3] = new Array('2702','甘肃酒泉');
tCitys[27][4] = new Array('2704','甘肃庆阳');
tCitys[27][5] = new Array('2705','甘肃金昌');
tCitys[27][6] = new Array('2706','甘肃白银');
tCitys[27][7] = new Array('2708','甘肃武威');
tCitys[27][8] = new Array('2709','甘肃定西地区');
tCitys[27][9] = new Array('2710','甘肃平凉');
tCitys[27][10] = new Array('2711','甘肃陇南地区');
tCitys[27][11] = new Array('2712','甘肃张掖');
tCitys[27][12] = new Array('2713','甘肃合作');
tCitys[27][13] = new Array('2715','甘肃敦煌');
tCitys[27][14] = new Array('2716','甘肃玉门');
tCitys[27][15] = new Array('2707','甘肃嘉峪关');
tCitys[27][16] = new Array('2714','甘肃临夏');
tCitys[28] = new Array;
tCitys[28][0] = new Array('2801','宁夏银川');
tCitys[28][1] = new Array('2804','宁夏吴忠');
tCitys[28][2] = new Array('2802','宁夏石嘴山');
tCitys[28][3] = new Array('2803','宁夏固原');
tCitys[28][4] = new Array('2899','宁夏其他城市');
tCitys[29] = new Array;
tCitys[29][0] = new Array('2903','青海海东');
tCitys[29][1] = new Array('2999','青海其他城市');
tCitys[29][2] = new Array('2901','青海西宁');
tCitys[29][3] = new Array('2902','青海玉树');
tCitys[29][4] = new Array('2906','青海海南');
tCitys[29][5] = new Array('2908','青海海西');
tCitys[29][6] = new Array('2904','青海海北');
tCitys[29][7] = new Array('2905','青海黄南');
tCitys[29][8] = new Array('2907','青海果洛');
tCitys[30] = new Array;
tCitys[30][0] = new Array('3006','新疆吐鲁番');
tCitys[30][1] = new Array('3007','新疆哈密');
tCitys[30][2] = new Array('3001','新疆乌鲁木齐');
tCitys[30][3] = new Array('3002','新疆克拉玛依');
tCitys[30][4] = new Array('3003','新疆石河子');
tCitys[30][5] = new Array('3004','新疆阿拉尔');
tCitys[30][6] = new Array('3005','新疆五家渠');
tCitys[30][7] = new Array('3008','新疆和田');
tCitys[30][8] = new Array('3099','新疆其他城市');
tCitys[30][9] = new Array('3010','新疆喀什');
tCitys[30][10] = new Array('3011','新疆阿图什');
tCitys[30][11] = new Array('3012','新疆库尔勒');
tCitys[30][12] = new Array('3013','新疆昌吉');
tCitys[30][13] = new Array('3009','新疆阿克苏');
tCitys[30][14] = new Array('3014','新疆博乐');
tCitys[30][15] = new Array('3015','新疆伊宁');
tCitys[30][16] = new Array('3016','新疆图木舒克');
tCitys[31] = new Array;
tCitys[31][0] = new Array('3101','西藏拉萨');
tCitys[31][1] = new Array('3199','西藏其他城市');
tCitys[31][2] = new Array('3104','西藏山南');
tCitys[31][3] = new Array('3105','西藏日喀则');
tCitys[31][4] = new Array('3106','西藏阿里');
tCitys[31][5] = new Array('3107','西藏林芝');
tCitys[31][6] = new Array('3102','西藏那曲');
tCitys[31][7] = new Array('3103','西藏昌都');
tCitys[32] = new Array;
tCitys[32][0] = new Array('3201','香港');
tCitys[32][1] = new Array('3202','中西区');
tCitys[32][2] = new Array('3204','九龙城区');
tCitys[32][3] = new Array('3206','南区');
tCitys[32][4] = new Array('3207','深水埗区');
tCitys[32][5] = new Array('3208','黄大仙区');
tCitys[32][6] = new Array('3209','湾仔区');
tCitys[32][7] = new Array('3210','油尖旺区');
tCitys[32][8] = new Array('3212','葵青区');
tCitys[32][9] = new Array('3213','北区');
tCitys[32][10] = new Array('3216','屯门区');
tCitys[32][11] = new Array('3218','荃湾区');
tCitys[32][12] = new Array('3219','元朗区');
tCitys[32][13] = new Array('3203','东区');
tCitys[32][14] = new Array('3205','观塘区');
tCitys[32][15] = new Array('3211','离岛区');
tCitys[32][16] = new Array('3214','西贡区');
tCitys[32][17] = new Array('3215','沙田区');
tCitys[32][18] = new Array('3217','大埔区');
tCitys[33] = new Array;
tCitys[33][0] = new Array('3301','台湾台北');
tCitys[33][1] = new Array('3302','台湾基隆');
tCitys[33][2] = new Array('3303','台湾台南');
tCitys[33][3] = new Array('3304','台湾台中');
tCitys[33][4] = new Array('3399','台湾其他城市');
tCitys[33][5] = new Array('3307','台湾高雄');
tCitys[33][6] = new Array('3309','台湾宜兰县');
tCitys[33][7] = new Array('3312','台湾苗栗县');
tCitys[33][8] = new Array('3313','台湾台中县');
tCitys[33][9] = new Array('3317','台湾云林县');
tCitys[33][10] = new Array('3318','台湾台南县');
tCitys[33][11] = new Array('3320','台湾屏东县');
tCitys[33][12] = new Array('3322','台湾花莲县');
tCitys[33][13] = new Array('3323','台湾澎湖县');
tCitys[33][14] = new Array('3324','台湾福建省');
tCitys[33][15] = new Array('3305','台湾新竹');
tCitys[33][16] = new Array('3306','台湾嘉义');
tCitys[33][17] = new Array('3308','台湾台北县');
tCitys[33][18] = new Array('3310','台湾新竹县');
tCitys[33][19] = new Array('3311','台湾桃园县');
tCitys[33][20] = new Array('3314','台湾彰化县');
tCitys[33][21] = new Array('3315','台湾南投县');
tCitys[33][22] = new Array('3316','台湾嘉义县');
tCitys[33][23] = new Array('3319','台湾高雄县');
tCitys[33][24] = new Array('3321','台湾台东县');
tCitys[34] = new Array;
tCitys[34][0] = new Array('3401','澳门');
tCitys[34][1] = new Array('3402','澳门半岛');
tCitys[34][2] = new Array('3403','凼仔岛');
tCitys[34][3] = new Array('3404','路环岛');
tCitys[35] = new Array;
tCitys[35][0] = new Array('3501','亚洲(除中国)');
tCitys[35][1] = new Array('3502','欧洲');
tCitys[35][2] = new Array('3503','北美洲');
tCitys[35][3] = new Array('3504','南美洲');
tCitys[35][4] = new Array('3505','大洋洲');
tCitys[35][5] = new Array('3506','非洲');
function ProvinceOptionMenu(value1,value2)
{
var i;
var j=0;
DefaultCity=value2;
document.write('<select style=\"display:none\" name=\"provs\"><OPTION VALUE=-1>未选</OPTION></select>');
provincebox = document.theform.prov;
pbox = document.theform.provs;
for(i = 0; i < ProvinceArray.length; i++)
{
provincebox.options[i] = new Option(ProvinceArray[i][1],ProvinceArray[i][1]);
pbox.options[i] = new Option(ProvinceArray[i][1],ProvinceArray[i][0]);
if(ProvinceArray[i][1]==value1){provincebox.options[i].selected=true;pbox.options[i].selected=true;j=1};
}
if(j==1){selectcity();}
//citybox.length = i;
}
function selectcity()
{
defaultcityindex=0;
provincebox = document.theform.prov;
pbox.selectedIndex=provincebox.selectedIndex
selcity = parseInt(pbox.selectedIndex);
tCity = tCitys[selcity];
if(tCity != null)
{
citybox = document.theform.city;
if (tCity.length>1){
citybox.options[0] = new Option("未选",-1);
for(i = 0; i < tCity.length; i++)
{
thecity = tCity[i][1];
str = thecity.replace(provincebox.options[provincebox.selectedIndex].text,'')
if(str==''){str=tCity[i][1]};
value = str;
if(value==DefaultCity){defaultcityindex=i};
citybox.options[i+1] = new Option(value, str);
}
citybox.length = i+1;
}
else
{
str = tCity[0][1];
value = tCity[0][1];
citybox.options[0] = new Option(value,str);
citybox.length=1
}
}
else{
citybox.options[0] = new Option("未选",-1);
citybox.length = 1;
}
if(IsChange==0){
citybox.options[defaultcityindex+1].selected=true;
defaultcityindex=0;
IsChange==1;
}else{
citybox.options[0].selected;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -