省市二级联动 北京 上海 天津 重庆 河北 山西 内蒙古 辽宁 吉林 黑龙江 江苏 浙江 安徽 福建 江西 山东 河南 湖北 湖南 广东 广西 海南 四川 贵州 云南 西藏 陕西 甘肃 宁夏 青海 新疆 香港 澳门 台湾 <script> var arr = new Array();<br>arr[0 ]="Dongcheng, Xicheng, Chongwen, Xuanwu, Chaoyang, Fengtai, Shijingshan, Haidian, Mentougou, Fangshan, Tongzhou, Shunyi, Changping, Daxing, Pinggu, Huairou, Miyun, Yanqing" arr[1 ]="Huangpu, Luwan, Xuhui, Changning, Jing'an, Putuo, Zhabei, Hongkou, Yangpu, Minhang, Baoshan, Jiading, Pudong, Jinshan, Songjiang, Qingpu, Nanhui, Fengxian, Chongming" arr[2]="Heping, Dongli, Hedong, West Qing, Hexi, Jinnan, Nankai, Beichen, Hebei, Wuqing, Hongjie, Tanggu, Hangu, Dagang, Ninghe, Jinghai, Baodi, Jixian" arr[3]="Wanzhou, Fuling, Yuzhong, Dadukou, Jiangbei, Shapingba, Jiulongpo, Nan'an, Beibei, Wansheng, Shuangjiao, Yubei, Banan, Qianjiang, Changshou, Qijiang, Tongnan, Tongliang, Dazu, Rongchang, Bishan, Liangping, Chengkou, Fengdu, Dianjiang ,Wulong, Zhongxian, Kaixian, Yunyang, Fengjie, Wushan, Wuxi, Shizhu, Xiushan, Youyang, Pengshui, Jiangjin, Hechuan, Yongchuan, Nanchuan" arr[4]="Shijiazhuang, Handan, Xingtai, Baoding , Zhangjiakou, Chengde, Langfang, Tangshan, Qinhuangdao, Cangzhou, Hengshui" arr[5]="Taiyuan, Datong, Yangquan, Changzhi, Jincheng, Shuozhou, Luliang, Xinzhou, Jinzhong, Linfen, Yuncheng" arr[6]= "Hohhot, Baotou, Wuhai, Chifeng, Hulunbuir League, Alxa League, Zhelimu League, Xing'an League, Ulanqab League, Xilingol League, Bayannur League, Yikezhao League" arr[7]="Shenyang , Dalian, Anshan, Fushun, Benxi, Dandong, Jinzhou, Yingkou, Fuxin, Liaoyang, Panjin, Tieling, Chaoyang, Huludao" arr[8]="Changchun, Jilin, Siping, Liaoyuan, Tonghua, Baishan, Songyuan, Baicheng, Yanbian" arr[9]="Harbin, Qiqihar, Mudanjiang, Jiamusi, Daqing, Suihua, Hegang, Jixi, Heihe, Shuangyashan, Yichun, Qitaihe, Daxinganling" arr[10]="Nanjing, Zhenjiang, Suzhou, Nantong, Yangzhou, Yancheng, Xuzhou, Lianyungang, Changzhou, Wuxi, Suqian, Taizhou, Huai'an" arr[11]="Hangzhou, Ningbo, Wenzhou, Jiaxing, Huzhou, Shaoxing, Jinhua, Quzhou, Zhoushan, Taizhou, Lishui" arr[ 12 ]="Hefei, Wuhu, Bengbu, Ma'anshan, Huaibei, Tongling, Anqing, Huangshan, Chuzhou, Suzhou, Chizhou, Huainan, Chaohu, Fuyang, Lu'an, Xuancheng, Bozhou" arr[13]="Fuzhou, Xiamen, Putian, Sanming, Quanzhou, Zhangzhou, Nanping, Longyan, Ningde" arr[14]="Nanchang, Jingdezhen, Jiujiang, Yingtan, Pingxiang, Xinyu, Ganzhou, Ji'an, Yichun, Fuzhou, Shangrao" arr[15]=" Jinan, Qingdao, Zibo, Zaozhuang, Dongying, Yantai, Weifang, Jining, Tai'an, Weihai, Rizhao, Laiwu, Linyi, Dezhou, Liaocheng, Binzhou, Heze" arr[16]="Zhengzhou, Kaifeng, Luoyang, Pingdingshan, Anyang, Hebi, Xinxiang, Jiaozuo, Puyang, Xuchang, Luohe, Sanmenxia, Nanyang, Shangqiu, Xinyang, Zhoukou, Zhumadian, Jiyuan" arr[17]="Wuhan, Yichang, Jingzhou, Xiangfan, Huangshi, Jingmen, Huanggang, Shiyan, Enshi, Qianjiang, Tianmen, Xiantao, Suizhou, Xianning, Xiaogan, Ezhou" arr[18]="Changsha, Changde, Zhuzhou, Xiangtan, Hengyang, Yueyang, Shaoyang, Yiyang, Loudi, Huaihua, Chenzhou, Yongzhou, Xiangxi, Zhangjiajie" arr [19]="Guangzhou, Shenzhen, Zhuhai, Shantou, Dongguan, Zhongshan, Foshan, Shaoguan, Jiangmen, Zhanjiang, Maoming, Zhaoqing, Huizhou, Meizhou, Shanwei, Heyuan, Yangjiang, Qingyuan, Chaozhou, Jieyang, Yunfu" arr[20 ]="Nanning, Liuzhou, Guilin, Wuzhou, Beihai, Fangchenggang, Qinzhou, Guigang, Yulin, Nanning area, Liuzhou area, Hezhou, Baise, Hechi" arr[21]="Haikou, Sanya" arr[22]="Chengdu , Mianyang, Deyang, Zigong, Panzhihua, Guangyuan, Neijiang, Leshan, Nanchong, Yibin, Guang'an, Dachuan, Ya'an, Meishan, Garze, Liangshan, Luzhou" arr[23]="Guiyang, Liupanshui, Zunyi, Anshun, Tongren, Southwest Guizhou, Bijie, Southeast Guizhou, Southern Guizhou" arr[24]="Kunming, Dali, Qujing, Yuxi, Zhaotong, Chuxiong, Honghe, Wenshan, Simao, Xishuangbanna, Baoshan, Dehong, Lijiang, Nujiang, Diqing, Lin Cang" arr[25]="Lhasa, Shigatse, Shannan, Nyingchi, Qamdo, Ali, Nagqu" arr[26]="Xi'an, Baoji, Xianyang, Tongchuan, Weinan, Yan'an, Yulin, Hanzhong, Ankang, Shangluo" arr[ 27 ]="Lanzhou, Jiayuguan, Jinchang, Baiyin, Tianshui, Jiuquan, Zhangye, Wuwei, Dingxi, Longnan, Pingliang, Qingyang, Linxia, Gannan" arr[28 ]="Yinchuan, Shizuishan, Wuzhong, Guyuan" arr[29 ]="Xining, Haidong, Hainan, Haibei, Huangnan, Yushu, Goluo, Haixi" arr[30]="Urumqi, Shihezi, Karamay, Ili, Bayingol, Changji, Kizilsu Kirgiz, Bortala, Turpan, Hami, Kashgar, Hotan, Aksu" arr[31]="Hong Kong" arr[32]="Macau" arr[33]="Taipei, Kaohsiung, Taichung, Tainan, Pingtung, Nantou, Yunlin, Hsinchu, Changhua, Miaoli, Chiayi, Hualien, Taoyuan, Yilan, Keelung, Taitung, Kinmen, Matsu, Penghu" function init()<br>{ var city = document.getElementById("city"); var cityArr = arr[0].split(","); for(var i=0;i<cityArr.length;i++)<br/> {<br/> city[i]=new Option(cityArr[i],cityArr[ i]);<br/> }<br/>}function getCity()<br/>{ var pro = document.getElementById("province"); var city = document.getElementById("city"); var index = pro.selectedIndex; var cityArr = arr[index].split(","); <br/> <br/> city.length = 0; //Fill the values in the city array into the city drop-down box<br/> for( var i=0;i<cityArr.length;i++)<br/> {<br/> city[i]=new Option(cityArr[i],cityArr[i]);<br/> }<br/>}</script>
The above is the detailed content of Native js secondary linkage. For more information, please follow other related articles on the PHP Chinese website!