![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
求一个asp.net+ajax的会员注册系统,包括ajax实现的省市县三级联动,并能显示出选择结果
展开全部
<!--
function Dsy()
{
this.Items = {};
}
Dsy.prototype.add = function(id,iArray)
{
this.Items[id] = iArray;
}
Dsy.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == "undefined") return false;
return true;
}
function change(v){
var str="0";
for(i=0;i<v;i++){ str+=("_"+(document.getElementById(s[i]).selectedIndex-1));};
var ss=document.getElementById(s[v]);
with(ss){
length = 0;
options[0]=new Option(opt0[v],opt0[v]);
if(v && document.getElementById(s[v-1]).selectedIndex>0 || !v)
{
if(dsy.Exists(str)){
ar = dsy.Items[str];
for(i=0;i<ar.length;i++)options[length]=new Option(ar[i],ar[i]);
if(v)options[1].selected = true;
}
}
if(++v<s.length){change(v);}
}
}
var dsy = new Dsy();
dsy.add("0",["北京","天津","福建","甘肃","广东","广西","贵州","海南","河北","河南","黑龙江","湖北","湖南","吉林","江苏","江西","辽宁","内蒙古","宁夏","青海","山东","山西","陕西","上海","四川","浙江","西藏","新疆","云南","安徽","重庆","台湾","香港","澳门"]);
dsy.add("0_0",["北京市区","北京辖县"]);
dsy.add("0_0_0",["东城区","西城区","崇文区","宣武区","朝阳区","丰台区","石景山区","海淀区","门头沟区","房山区","通州区","顺义区","昌平区","大兴区","怀柔区","平谷区","地点面议"]);
dsy.add("0_0_1",["密云县","延庆县","地点面议"]);
dsy.add("0_1",["天津市区","天津辖县"]);
dsy.add("0_1_0",["和平区","河东区","河西区","南开区","河北区","红桥区","塘沽区","汉沽区","大港区","东丽区","西青区","津南区","北辰区","武清区","宝坻区","地点面议"]);
dsy.add("0_1_1",["蓟县","静海县","宁河县","天津市","地点面议"]);
dsy.add("0_2",["福州","龙岩","南平","宁德","莆田","泉州","三明","厦门","漳州"]);
dsy.add("0_2_0",["鼓楼区","台江区","仓山区","马尾区","晋安区","长乐市","福清市","福州市","连江县","罗源县","闽侯县","闽清县","平潭县","永泰县","地点面议"]);
dsy.add("0_2_1",["新罗区","长汀县","连城县","龙岩市","上杭县","武平县","永定县","漳平市","地点面议"]);
dsy.add("0_2_2",["延平区","光泽县","建阳市","建瓯市","南平市","浦城县","邵武市","顺昌县","松溪县","武夷山市","政和县","地点面议"]);
dsy.add("0_2_3",["蕉城区","福安市","福鼎市","古田县","宁德市","屏南县","寿宁县","霞浦县","周宁县","柘荣县","地点面议"]);
dsy.add("0_2_4",["城厢区","涵江区","荔城区","秀屿区","莆田市","仙游县","地点面议"]);
dsy.add("0_2_5",["鲤城区","丰泽区","洛江区","泉港区","安溪县","德化县","惠安县","金门县","晋江市","南安市","泉州市","石狮市","永春县","地点面议"]);
dsy.add("0_2_6",["梅列区","三元区","大田县","建宁县","将乐县","明溪县","宁化县","清流县","三明市","沙县","泰宁县","永安市","尤溪县","地点面议"]);
dsy.add("0_2_7",["鼓浪屿区","思明区","开元区","杏林区","湖里区","集美区","同安区","厦门市","地点面议"]);
dsy.add("0_2_8",["芗城区","龙文区","长泰县","东山县","华安县","龙海市","南靖县","平和县","云霄县","漳浦县","漳州市","诏安县","地点面议"]);
dsy.add("0_3",["白银","定西","甘南州","嘉峪关","金昌","酒泉","兰州","临夏州","陇南","平凉","庆阳","天水","武威","张掖","地点面议"]);
dsy.add("0_3_0",["白银区","平川区","白银市","会宁县","景泰县","靖远县","地点面议"]);
dsy.add("0_3_1",["定西县","临洮县","陇西县","通渭县","渭源县","漳县","岷县","地点面议"]);
dsy.add("0_3_2",["迭部县","合作市","临潭县","碌曲县","玛曲县","夏河县","舟曲县","卓尼县","地点面议"]);
dsy.add("0_3_3",["嘉峪关市"]);
dsy.add("0_3_4",["金川区","金昌市","永昌县","地点面议"]);
dsy.add("0_3_5",["肃州区","阿克塞县","安西县","敦煌市","金塔县","酒泉市","肃北蒙古县","玉门市","地点面议"]);
dsy.add("0_3_6",["城关区","七里河区","西固区","安宁区","红古区","皋兰县","兰州市","永登县","榆中县","地点面议"]);
dsy.add("0_3_7",["东乡族县","广河县","和政县","积石山保安","康乐县","临夏市","临夏县","永靖县","地点面议"]);
dsy.add("0_3_8",["成县","徽县","康县","礼县","两当县","文县","武都县","西和县","宕昌县","地点面议"]);
dsy.add("0_3_9",["崆峒区","崇信县","华亭县","静宁县","灵台县","平凉市","庄浪县","泾川县","地点面议"]);
dsy.add("0_3_10",["西峰区","合水县","华池县","环县","宁县","庆城县","庆阳市","镇原县","正宁县","地点面议"]);
dsy.add("0_3_11",["秦城区","北道区","甘谷县","秦安县","清水县","天水市","武山县","张家川回族","地点面议"]);
dsy.add("0_3_12",["凉州区","古浪县","民勤县","天祝藏族县","武威市","地点面议"]);
dsy.add("0_3_13",["甘州区","高台县","临泽县","民乐县","山丹县","肃南裕固县","张掖市","地点面议"]);
dsy.add("0_4",["潮州","东莞","佛山","广州","河源","惠州","江门","揭阳","茂名","梅州","清远","汕头","汕尾","韶关","深圳","阳江","云浮","湛江","肇庆","中山","珠海"]);
dsy.add("0_4_0",["湘桥区","潮安县","潮州市","饶平县","地点面议"]);
dsy.add("0_4_1",["东莞市"]);
dsy.add("0_4_2",["禅城区","南海区","顺德区","三水区","高明区","佛山市","地点面议"]);
dsy.add("0_4_3",["东山区","荔湾区","越秀区","海珠区","天河区","芳村区","白云区","黄埔区","番禺区","花都区","从化市","广州市","增城市","地点面议"]);
dsy.add("0_4_4",["源城区","东源县","和平县","河源市","连平县","龙川县","紫金县","地点面议"]);
dsy.add("0_4_5",["惠城区","博罗县","惠东县","惠阳市","惠州市","龙门县","地点面议"]);
dsy.add("0_4_6",["蓬江区","江海区","新会区","恩平市","鹤山市","江门市","开平市","台山市","地点面议"]);
dsy.add("0_4_7",["榕城区","惠来县","揭东县","揭西县","揭阳市","普宁市","地点面议"]);
dsy.add("0_4_8",["茂南区","茂港区","电白县","高州市","化州市","茂名市","信宜市","地点面议"]);
dsy.add("0_4_9",["梅江区","大埔县","丰顺县","蕉岭县","梅县","梅州市","平远县","五华县","兴宁市","地点面议"]);
dsy.add("0_4_10",["清城区","佛冈县","连南瑶族县","连山壮瑶县","连州市","清新县","清远市","阳山县","英德市","地点面议"]);
dsy.add("0_4_11",["达濠区","龙湖区","金园区","升平区","河浦区","潮阳市","澄海市","南澳县","汕头市","地点面议"]);
dsy.add("0_4_12",["海丰县","陆丰市","陆河县","汕尾市","地点面议"]);
dsy.add("0_4_13",["北江区","武江区","浈江区","乐昌市","南雄市","曲江县","仁化县","乳源瑶族县","韶关市","始兴县","翁源县","新丰县","地点面议"]);
dsy.add("0_4_14",["罗湖区","福田区","南山区","宝安区","龙岗区","盐田区","深圳市","地点面议"]);
dsy.add("0_4_15",["阳春市","阳东县","阳江市","阳西县","地点面议"]);
dsy.add("0_4_16",["云城区","罗定市","新兴县","郁南县","云安县","云浮市","地点面议"]);
dsy.add("0_4_17",["赤坎区","霞山区","坡头区","麻章区","雷州市","廉江市","遂溪县","吴川市","徐闻县","湛江市","地点面议"]);
dsy.add("0_4_18",["端州区","鼎湖区","德庆县","封开县","高要市","广宁县","怀集县","四会市","肇庆市","地点面议"]);
dsy.add("0_4_19",["中山市","地点面议"]);
dsy.add("0_4_20",["香洲区","斗门区","金湾区","珠海市","地点面议"]);
dsy.add("0_5",["百色","北海","崇左","防城港","桂林","贵港","河池","贺州","来宾","柳州","南宁","钦州","梧州","玉林","地点面议"]);
dsy.add("0_5_0",["右江区","百色市","德保县","靖西县","乐业县","凌云县","隆林各族县","那坡县","平果县","田东县","田林县","田阳县","西林县","地点面议"]);
dsy.add("0_5_1",["海城区","银海区","铁山港区","北海市","合浦县","地点面议"]);
dsy.add("0_5_2",["崇左市","大新县","扶绥县","龙州县","宁明县","凭祥市","天等县","地点面议"]);
dsy.add("0_5_3",["港口区","防城区","东兴市","防城港市","上思县","地点面议"]);
dsy.add("0_5_4",["秀峰区","叠彩区","象山区","七星区","雁山区","恭城瑶族县","灌阳县","桂林市","荔浦县","临桂县","灵川县","龙胜各族县","平乐县","全州县","兴安县","阳朔县","永福县","资源县","地点面议"]);
dsy.add("0_5_5",["港北区","港南区","桂平市","贵港市","平南县","地点面议"]);
dsy.add("0_5_6",["金城江区","巴马瑶族县","大化瑶族县","东兰县","都安瑶族县","凤山县","河池市","环江毛南县","罗城仡佬县","南丹县","天峨县","宜州市","地点面议"]);
dsy.add("0_5_7",["八步区","富川瑶族县","贺州市","昭平县","钟山县","地点面议"]);
dsy.add("0_5_8",["兴宾区","合山市","金秀瑶族县","来宾市","武宣县","象州县","忻城县","地点面议"]);
dsy.add("0_5_9",["城中区","鱼峰区","柳南区","柳北区","柳城县","柳江县","柳州市","鹿寨县","融安县","融水苗族县","三江侗族县","地点面议"]);
dsy.add("0_5_10",["兴宁区","新城区","城北区","江南区","永新区","宾阳县","横县","隆安县","马山县","南宁市","上林县","武鸣县","邕宁县","地点面议"]);
dsy.add("0_5_11",["钦南区","钦北区","灵山县","浦北县","钦州市","地点面议"]);
dsy.add("0_5_12",["万秀区","蝶山区","市郊区","苍梧县","蒙山县","藤县","梧州市","岑溪市","地点面议"]);
dsy.add("0_5_13",["玉州区","北流市","博白县","陆川县","容县","兴业县","玉林市","地点面议"]);
dsy.add("0_31",["台湾"]);
dsy.add("0_31_0",["台湾"]);
dsy.add("0_32",["香港"]);
dsy.add("0_32_0",["香港"]);
dsy.add("0_33",["澳门"]);
dsy.add("0_33_0",["澳门"]);
var s=["s1","s2","s3"];
var opt0 = ["省份","地级市","选择区县"];
function setup()
{
for(i=0;i<s.length-1;i++)
document.getElementById(s[i]).onchange=new Function("change("+(i+1)+")");
change(0);
}
//-->
function Dsy()
{
this.Items = {};
}
Dsy.prototype.add = function(id,iArray)
{
this.Items[id] = iArray;
}
Dsy.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == "undefined") return false;
return true;
}
function change(v){
var str="0";
for(i=0;i<v;i++){ str+=("_"+(document.getElementById(s[i]).selectedIndex-1));};
var ss=document.getElementById(s[v]);
with(ss){
length = 0;
options[0]=new Option(opt0[v],opt0[v]);
if(v && document.getElementById(s[v-1]).selectedIndex>0 || !v)
{
if(dsy.Exists(str)){
ar = dsy.Items[str];
for(i=0;i<ar.length;i++)options[length]=new Option(ar[i],ar[i]);
if(v)options[1].selected = true;
}
}
if(++v<s.length){change(v);}
}
}
var dsy = new Dsy();
dsy.add("0",["北京","天津","福建","甘肃","广东","广西","贵州","海南","河北","河南","黑龙江","湖北","湖南","吉林","江苏","江西","辽宁","内蒙古","宁夏","青海","山东","山西","陕西","上海","四川","浙江","西藏","新疆","云南","安徽","重庆","台湾","香港","澳门"]);
dsy.add("0_0",["北京市区","北京辖县"]);
dsy.add("0_0_0",["东城区","西城区","崇文区","宣武区","朝阳区","丰台区","石景山区","海淀区","门头沟区","房山区","通州区","顺义区","昌平区","大兴区","怀柔区","平谷区","地点面议"]);
dsy.add("0_0_1",["密云县","延庆县","地点面议"]);
dsy.add("0_1",["天津市区","天津辖县"]);
dsy.add("0_1_0",["和平区","河东区","河西区","南开区","河北区","红桥区","塘沽区","汉沽区","大港区","东丽区","西青区","津南区","北辰区","武清区","宝坻区","地点面议"]);
dsy.add("0_1_1",["蓟县","静海县","宁河县","天津市","地点面议"]);
dsy.add("0_2",["福州","龙岩","南平","宁德","莆田","泉州","三明","厦门","漳州"]);
dsy.add("0_2_0",["鼓楼区","台江区","仓山区","马尾区","晋安区","长乐市","福清市","福州市","连江县","罗源县","闽侯县","闽清县","平潭县","永泰县","地点面议"]);
dsy.add("0_2_1",["新罗区","长汀县","连城县","龙岩市","上杭县","武平县","永定县","漳平市","地点面议"]);
dsy.add("0_2_2",["延平区","光泽县","建阳市","建瓯市","南平市","浦城县","邵武市","顺昌县","松溪县","武夷山市","政和县","地点面议"]);
dsy.add("0_2_3",["蕉城区","福安市","福鼎市","古田县","宁德市","屏南县","寿宁县","霞浦县","周宁县","柘荣县","地点面议"]);
dsy.add("0_2_4",["城厢区","涵江区","荔城区","秀屿区","莆田市","仙游县","地点面议"]);
dsy.add("0_2_5",["鲤城区","丰泽区","洛江区","泉港区","安溪县","德化县","惠安县","金门县","晋江市","南安市","泉州市","石狮市","永春县","地点面议"]);
dsy.add("0_2_6",["梅列区","三元区","大田县","建宁县","将乐县","明溪县","宁化县","清流县","三明市","沙县","泰宁县","永安市","尤溪县","地点面议"]);
dsy.add("0_2_7",["鼓浪屿区","思明区","开元区","杏林区","湖里区","集美区","同安区","厦门市","地点面议"]);
dsy.add("0_2_8",["芗城区","龙文区","长泰县","东山县","华安县","龙海市","南靖县","平和县","云霄县","漳浦县","漳州市","诏安县","地点面议"]);
dsy.add("0_3",["白银","定西","甘南州","嘉峪关","金昌","酒泉","兰州","临夏州","陇南","平凉","庆阳","天水","武威","张掖","地点面议"]);
dsy.add("0_3_0",["白银区","平川区","白银市","会宁县","景泰县","靖远县","地点面议"]);
dsy.add("0_3_1",["定西县","临洮县","陇西县","通渭县","渭源县","漳县","岷县","地点面议"]);
dsy.add("0_3_2",["迭部县","合作市","临潭县","碌曲县","玛曲县","夏河县","舟曲县","卓尼县","地点面议"]);
dsy.add("0_3_3",["嘉峪关市"]);
dsy.add("0_3_4",["金川区","金昌市","永昌县","地点面议"]);
dsy.add("0_3_5",["肃州区","阿克塞县","安西县","敦煌市","金塔县","酒泉市","肃北蒙古县","玉门市","地点面议"]);
dsy.add("0_3_6",["城关区","七里河区","西固区","安宁区","红古区","皋兰县","兰州市","永登县","榆中县","地点面议"]);
dsy.add("0_3_7",["东乡族县","广河县","和政县","积石山保安","康乐县","临夏市","临夏县","永靖县","地点面议"]);
dsy.add("0_3_8",["成县","徽县","康县","礼县","两当县","文县","武都县","西和县","宕昌县","地点面议"]);
dsy.add("0_3_9",["崆峒区","崇信县","华亭县","静宁县","灵台县","平凉市","庄浪县","泾川县","地点面议"]);
dsy.add("0_3_10",["西峰区","合水县","华池县","环县","宁县","庆城县","庆阳市","镇原县","正宁县","地点面议"]);
dsy.add("0_3_11",["秦城区","北道区","甘谷县","秦安县","清水县","天水市","武山县","张家川回族","地点面议"]);
dsy.add("0_3_12",["凉州区","古浪县","民勤县","天祝藏族县","武威市","地点面议"]);
dsy.add("0_3_13",["甘州区","高台县","临泽县","民乐县","山丹县","肃南裕固县","张掖市","地点面议"]);
dsy.add("0_4",["潮州","东莞","佛山","广州","河源","惠州","江门","揭阳","茂名","梅州","清远","汕头","汕尾","韶关","深圳","阳江","云浮","湛江","肇庆","中山","珠海"]);
dsy.add("0_4_0",["湘桥区","潮安县","潮州市","饶平县","地点面议"]);
dsy.add("0_4_1",["东莞市"]);
dsy.add("0_4_2",["禅城区","南海区","顺德区","三水区","高明区","佛山市","地点面议"]);
dsy.add("0_4_3",["东山区","荔湾区","越秀区","海珠区","天河区","芳村区","白云区","黄埔区","番禺区","花都区","从化市","广州市","增城市","地点面议"]);
dsy.add("0_4_4",["源城区","东源县","和平县","河源市","连平县","龙川县","紫金县","地点面议"]);
dsy.add("0_4_5",["惠城区","博罗县","惠东县","惠阳市","惠州市","龙门县","地点面议"]);
dsy.add("0_4_6",["蓬江区","江海区","新会区","恩平市","鹤山市","江门市","开平市","台山市","地点面议"]);
dsy.add("0_4_7",["榕城区","惠来县","揭东县","揭西县","揭阳市","普宁市","地点面议"]);
dsy.add("0_4_8",["茂南区","茂港区","电白县","高州市","化州市","茂名市","信宜市","地点面议"]);
dsy.add("0_4_9",["梅江区","大埔县","丰顺县","蕉岭县","梅县","梅州市","平远县","五华县","兴宁市","地点面议"]);
dsy.add("0_4_10",["清城区","佛冈县","连南瑶族县","连山壮瑶县","连州市","清新县","清远市","阳山县","英德市","地点面议"]);
dsy.add("0_4_11",["达濠区","龙湖区","金园区","升平区","河浦区","潮阳市","澄海市","南澳县","汕头市","地点面议"]);
dsy.add("0_4_12",["海丰县","陆丰市","陆河县","汕尾市","地点面议"]);
dsy.add("0_4_13",["北江区","武江区","浈江区","乐昌市","南雄市","曲江县","仁化县","乳源瑶族县","韶关市","始兴县","翁源县","新丰县","地点面议"]);
dsy.add("0_4_14",["罗湖区","福田区","南山区","宝安区","龙岗区","盐田区","深圳市","地点面议"]);
dsy.add("0_4_15",["阳春市","阳东县","阳江市","阳西县","地点面议"]);
dsy.add("0_4_16",["云城区","罗定市","新兴县","郁南县","云安县","云浮市","地点面议"]);
dsy.add("0_4_17",["赤坎区","霞山区","坡头区","麻章区","雷州市","廉江市","遂溪县","吴川市","徐闻县","湛江市","地点面议"]);
dsy.add("0_4_18",["端州区","鼎湖区","德庆县","封开县","高要市","广宁县","怀集县","四会市","肇庆市","地点面议"]);
dsy.add("0_4_19",["中山市","地点面议"]);
dsy.add("0_4_20",["香洲区","斗门区","金湾区","珠海市","地点面议"]);
dsy.add("0_5",["百色","北海","崇左","防城港","桂林","贵港","河池","贺州","来宾","柳州","南宁","钦州","梧州","玉林","地点面议"]);
dsy.add("0_5_0",["右江区","百色市","德保县","靖西县","乐业县","凌云县","隆林各族县","那坡县","平果县","田东县","田林县","田阳县","西林县","地点面议"]);
dsy.add("0_5_1",["海城区","银海区","铁山港区","北海市","合浦县","地点面议"]);
dsy.add("0_5_2",["崇左市","大新县","扶绥县","龙州县","宁明县","凭祥市","天等县","地点面议"]);
dsy.add("0_5_3",["港口区","防城区","东兴市","防城港市","上思县","地点面议"]);
dsy.add("0_5_4",["秀峰区","叠彩区","象山区","七星区","雁山区","恭城瑶族县","灌阳县","桂林市","荔浦县","临桂县","灵川县","龙胜各族县","平乐县","全州县","兴安县","阳朔县","永福县","资源县","地点面议"]);
dsy.add("0_5_5",["港北区","港南区","桂平市","贵港市","平南县","地点面议"]);
dsy.add("0_5_6",["金城江区","巴马瑶族县","大化瑶族县","东兰县","都安瑶族县","凤山县","河池市","环江毛南县","罗城仡佬县","南丹县","天峨县","宜州市","地点面议"]);
dsy.add("0_5_7",["八步区","富川瑶族县","贺州市","昭平县","钟山县","地点面议"]);
dsy.add("0_5_8",["兴宾区","合山市","金秀瑶族县","来宾市","武宣县","象州县","忻城县","地点面议"]);
dsy.add("0_5_9",["城中区","鱼峰区","柳南区","柳北区","柳城县","柳江县","柳州市","鹿寨县","融安县","融水苗族县","三江侗族县","地点面议"]);
dsy.add("0_5_10",["兴宁区","新城区","城北区","江南区","永新区","宾阳县","横县","隆安县","马山县","南宁市","上林县","武鸣县","邕宁县","地点面议"]);
dsy.add("0_5_11",["钦南区","钦北区","灵山县","浦北县","钦州市","地点面议"]);
dsy.add("0_5_12",["万秀区","蝶山区","市郊区","苍梧县","蒙山县","藤县","梧州市","岑溪市","地点面议"]);
dsy.add("0_5_13",["玉州区","北流市","博白县","陆川县","容县","兴业县","玉林市","地点面议"]);
dsy.add("0_31",["台湾"]);
dsy.add("0_31_0",["台湾"]);
dsy.add("0_32",["香港"]);
dsy.add("0_32_0",["香港"]);
dsy.add("0_33",["澳门"]);
dsy.add("0_33_0",["澳门"]);
var s=["s1","s2","s3"];
var opt0 = ["省份","地级市","选择区县"];
function setup()
{
for(i=0;i<s.length-1;i++)
document.getElementById(s[i]).onchange=new Function("change("+(i+1)+")");
change(0);
}
//-->
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询