Current location - Recipe Complete Network - Complete cookbook of home-style dishes - Now I need a two-level linkage city drop-down menu asp source code, comrades, help me!
Now I need a two-level linkage city drop-down menu asp source code, comrades, help me!
& lt scripting language = "JavaScript">

Function Dsy ()

{

This. items = { };

}

Dsy.prototype.add = function(id,iArray)

{

This. items[id]= I array;

}

dsy . prototype . exists = function(id)

{

if(typeof(this。 Items[id]) == "undefined ") returns false.

Return true

}

Functional changes (5) {

var str = " 0

for(I = 0; I'm< five; i++){ str+=(" _ "+(document . getelementbyid(s[I])。 selectedIndex- 1)); };

var ss = document . getelementbyid(s[v]);

Band (ss)

Length = 0;

options[0]=new Option(opt0[v],opt 0[v]);

If (v & document. getelementbyid (s [v-1]). selectedIndex & gt0 || ! V)

{

If (dsy. Exists(str)){

ar = dsy。 items[str];

for(I = 0; I & ltar. Length; i++)options[length]= new Option(ar[I],ar[I]);

If(v) option [1]. selected = true

}

}

if(++v & lt; S. length){ change (v); }

}

}

var Dsy = new Dsy();

Dsy.add("0 ",["Beijing ","Tianjin ","Hebei ","Shanxi ","Inner Mongolia ","Liaoning ","Jilin ","Heilongjiang ","Shanghai ","Jiangsu ","Zhejiang ","Anhui ","Sichuan "and".

Dsy.add("0_0 ","Beijing ","Dongcheng District ","Xicheng District ","Chongwen District ","Xuanwu District ","Chaoyang District ","Fengtai District ","Shijingshan District ","Haidian District (Zhongguancun) ","Mentougou District "and" Fangshan District ".

Dsy.add("0_ 1 ",["Heping District ","Hedong District ","Hexi District ","Nankai District ","Hongqiao District ","Tanggu District ","Hangu District ","Dagang District ","Xiqing District "and" Jinnan District ",

Dsy.add("0_2 ",["Shijiazhuang ","Zhangjiakou ","Chengde ","Qinhuangdao ","Tangshan ","Langfang ","Hengshui ","Cangzhou ","Xingtai ","Handan ","Baoding "and" others ".

Dsy.add("0_3 ",["Taiyuan City ","Shuozhou City ","Datong City ","Changzhi City ","Jincheng City ","Xinzhou City ","Jinzhong City ","Linfen City ","Lvliang City ","Yuncheng City "and" Others "]);

Dsy.add("0_4 ",["Hohhot ","Baotou ","Chifeng ","Hulunbeier ","Ordos ","Wulanchabu ","Bayannaoer ","Xing 'an League ","Alashan League ","Xilin Gol League ","Other "].

Dsy.add("0_5 ",["Shenyang ","Chaoyang ","Fuxin ","Tieling ","Fushun ","Dandong ","Benxi ","Liaoyang ","Anshan ","Dalian ","Yingkou "and" Panjin ")

Dsy.add("0_6 ",["Changchun ","Baicheng ","Jilin ","Siping ","Liaoyuan ","Tonghua ","baishan city ","Yanbian Korean Autonomous Prefecture ","Other "]);

Dsy.add("0_7 ",["Harbin ","qitaihe city ","Heihe ","Daqing ","Qiqihar ","Yichun ","Jiamusi ","Shuangyashan ","Jixi ","Daxinganling area (Jiagedaqi) ",".

Dsy.add("0_8 ","Huangpu District ","Luwan District ","Xuhui District ","Changning District ","Jing 'an District ","Putuo District ","Zhabei District ","Hongkou District ","Yangpu District ","Minhang District ","Baoshan District ",".

Dsy.add("0_9 ",["Nanjing ","Xuzhou ","Lianyungang ","Suqian ","Huai 'an ","Yancheng ","Yangzhou ","Taizhou ","Nantong ","Zhenjiang ","Changzhou "and" Wuxi ".

Dsy.add("0_ 10 ",["Hangzhou ","Huzhou ","Jiaxing ","Zhoushan ","Ningbo ","Shaoxing ","Quzhou ","Jinhua ","Taizhou ","Wenzhou "and" Lishui ".

Dsy.add("0_ 1 1 ",["Hefei ","Suzhou ","Huaibei ","Bozhou ","Fuyang ","Bengbu ","Huainan ","Chuzhou ","Maanshan "and" Wuhu ".

Dsy.add("0_ 12 ",["Fuzhou ","Nanping ","Putian ","Sanming ","Quanzhou ","Xiamen ","Zhangzhou ","Longyan ","Ningde "and" others "]);

Dsy.add("0_ 13 ","Nanchang ","Jiujiang ","Jingdezhen ","yingtan ","Xinyu ","Pingxiang ","Ganzhou ","Shangrao ","Fuzhou ","Yichun ",".

Dsy.add("0_ 14 ",["Jinan ","Liaocheng ","Dezhou ","Dongying ","Zibo ","Weifang ","Yantai ","Weihai ","Qingdao ","Rizhao "and" Linyi ".

Dsy.add("0_ 15 ",["Zhengzhou ","Sanmenxia ","Luoyang ","Jiaozuo ","Xinxiang ","Hebi ","Anyang ","Puyang ","Kaifeng ","Shangqiu "and" Xuchang ".

Dsy.add("0_ 16 ",["Wuhan ","Shiyan ","Xiangfan ","Jingmen ","Xiaogan ","Huanggang ","Ezhou ","Huangshi ","Xianning ","Jingzhou "and" Yichang ".

Dsy.add("0_ 17 ",["Changsha ","Zhangjiajie ","Changde ","Yiyang ","Yueyang ","Zhuzhou ","Xiangtan ","Hengyang ","Chenzhou ","Yongzhou "and" Shaoyang ".

Dsy.add("0_ 18 ",["Guangzhou ","Qingyuan ","Shaoguan ","Heyuan ","Meizhou ","Chaozhou ","Shantou ","Jieyang ","Shanwei ","Huizhou "and" Dongguan ".

Dsy.add("0_ 19 ",["Nanning ","Guilin ","Liuzhou ","Wuzhou ","Guigang ","Yulin ","Qinzhou ","Beihai ","Fangchenggang ","Chongzuo "and" Baise ".

Dsy.add("0_20 ",["Haikou ","Sanya ","Other "]);

Dsy.add("0_2 1 ",["Yuzhong District ","dadukou district ","Jiangbei District ","Shapingba District ","Jiulongpo District ","Nan 'an District ","Beibei District ","Wansheng District ","Shuangqiao District ","Yubei District ",". Tongnan County, Tongliang County, Dazu County, Bishan County, Dianjiang County, Wulong County, Fengdu County, Chengkou County, Kaixian County, Wuxi County, Wushan County, fengjie county County and Yunyang County.

Dsy.add("0_22 ",["Chengdu ","Guangyuan ","Mianyang ","Deyang ","Nanchong ","Guang 'an ","Suining ","Neijiang ","Leshan ","Zigong ","Luzhou "and" Yibin ".

Dsy.add("0_23 ",["Guiyang ","Liupanshui ","Zunyi ","Anshun ","Bijie ","Tongren ","Qiandongnan Miao and Dong Autonomous Prefecture ","Qiannan Buyi and Miao Autonomous Prefecture ","Southwest Buyi and Miao Autonomous Prefecture ","Other "].

Dsy.add("0_24 ",["Kunming ","Qujing ","Yuxi ","Baoshan ","Zhaotong ","Lijiang ","Pu 'er ","Lincang ","Ningde ","Dehong Autonomous Prefecture "and" Nujiang ".

Dsy.add("0_25 ",["Lhasa ","Naqu ","Qamdo ","Linzhi ","Shannan ","Xigaze ","Ali ","Other "]);

Dsy.add("0_26 ",["Xi 'an", "Yan 'an", "Tongchuan", "Weinan", "Xianyang", "Baoji", "Hanzhong", "Ankang", "Shangluo", "Other"]);

Dsy.add("0_27 ",["Lanzhou ","Jiayuguan ","Jinchang ","Baiyin ","Tianshui ","Wuwei ","Jiuquan ","Zhangye ","Qingyang ","Pingliang ","Dingxi "and" Longnan ".

Dsy.add("0_28 ",["Xining City ","Haidong Area ","Haibei Tibetan Autonomous Prefecture ","Huangnan Tibetan Autonomous Prefecture ","Yushu Tibetan Autonomous Prefecture ","Hainan Tibetan Autonomous Prefecture ","Guoluo Tibetan Autonomous Prefecture ","Haixi Mongolian Tibetan Autonomous Prefecture ","Other "]);

Dsy.add("0_29 ",["Yinchuan ","Shizuishan ","Wuzhong ","Guyuan ","Zhongwei ","Other "]);

Dsy.add("0_30 ",["Urumqi ","Karamay ","Kashi ","Aksu ","Hotan ","Turpan ","Hami ","Tacheng ","Altay ","Kizilsu Kirgiz Autonomous Prefecture "and" Bortala Mongolia ".

Dsy.add("0_3 1 ",["Hong Kong ","Other "]);

Dsy.add("0_3 1 ",["Macau ","Other "])

Dsy.add("0_32 ",["Taiwan Province Province ","Other "])

//-& gt;

& lt/SCRIPT & gt;

& lt scripting language = JavaScript & gt

var s=["s 1 "," S2 "];

Var opt0 = ["Please select", "Please select"];

Function Settings ()

{

for(I = 0; I & lts.length-1; i++)

document.getElementById(s[i])。 onchange = new Function(" change("+(I+ 1)+"));

Change (0);

}

& lt/SCRIPT & gt;

Call:

& lt option & gt& lt/option & gt;; & lt/select & gt;

& ltselect name = " lz _ sx " id = " s2 " & gt

& lt option & gt& lt/option & gt;; & lt/select & gt;

& lt scripting language = "javascript">

Settings ()

& lt/SCRIPT & gt;