`
阅读更多
级联菜单:(1.js文件)
<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> 1 function Dsy() 
 2 
 3     this.Items = {};
 4  }
 5 Dsy.prototype.add = function(id,iArray) { this.Items[id] = iArray; } 
 6 Dsy.prototype.Exists = function(id) { if(typeof(this.Items[id]) == "undefined"return falsereturn true; };
 7 function change(v){
 8     var str="0";
 9     for(i=0;i<v;i++)
10     { 
11         str+=("_"+(document.getElementById(s[i]).selectedIndex-1));
12     };
13     var ss=document.getElementById(s[v]);
14     with(ss){
15         length = 0;
16         options[0]=new Option(opt0[v],opt0[v]);
17         if(v && document.getElementById(s[v-1]).selectedIndex>0 || !v)
18         {
19             if(dsy.Exists(str)){
20                 ar = dsy.Items[str];
21                 for(i=0;i<ar.length;i++)options[length]=new Option(ar[i],ar[i]);
22                 if(v)options[1].selected = true;
23             }
24         }
25         if(++v<s.length){change(v);}
26     }
27 }
28 var dsy = new Dsy();
29 dsy.add("0",["安徽省","北京市","福建省","甘肃省","广东省","广西壮族自治区","贵州省","海南省","河北省","河南省","黑龙江省","湖北省","湖南省","吉林省","江苏省","江西省","解放军","辽宁省","内蒙古自治区","宁夏回族自治区","青海省","山东省","山西省","陕西省","上海市","四川省","台湾省","天津市","西藏自治区","新疆维吾尔自治区","云南省","浙江省"]);  dsy.add("0_0_0",["枞阳县","大观区","怀宁县","郊区","潜山县","市辖区","宿松县","太湖县","桐城县","望江县","迎江区","岳西县"]); dsy.add("0_0_1",["东市区","固镇县","怀远县","郊区","市辖区","五河县","西市区","中市区"]); dsy.add("0_0_2",["巢湖市","含山县","和县","庐江县","无为县"]); ; dsy.add("0_5_12",["北流县","博白县","贵港市","桂平县","陆川县","平南县","容县","玉林市"]); dsy.add("0_5",["百色地区","北海市","桂林地区","桂林市","河池地区","柳州地区","柳州市","南宁地区","南宁市","钦州地区","梧州地区","梧州市","玉林地区"]); dsy.add("0_6_0",["安顺市","关岭布依族苗族自治县","开阳县","平坝县","普定县","清镇市","息烽县","修文县","镇宁布依族苗族自治县","紫云苗族布依族自治县"]); dsy.add("0_6_1",["毕节县","大方县","赫章县","金沙县","纳雍县","黔西县","威宁彝族回族苗族自治县","织金县"]); dsy.add("0_6_2",["白云区","花溪区","南明区","市辖区","乌当区","云岩区"]); dsy.add("0_6_3",["六枝特区","盘县特区","水城县","钟山区"]); dsy.add("0_6_4",["岑巩县","从江县","丹寨县","黄平县","剑河县","锦屏县","凯里市","雷山县","黎平县","麻江县","榕江县","三穗县","施秉县","台江县","天柱县","镇远县"]); dsy.add("0_6_5",["长顺县","都匀市","独山县","福泉县","贵定县","惠水县","荔波县","龙里县","罗甸县","平塘县","三都水族自治县","瓮安县"]); dsy.add("0_6_6",["安龙县","册亨县","普安县","晴隆县","望谟县","兴仁县","兴义市","贞丰县"]); dsy.add("0_6_7",["德江县","江口县","石阡县","思南县","松桃苗族自治县","铜仁市","万山特区","沿河土家族自治县","印江土家族苗族自治县","玉屏侗族自治县"]); dsy.add("0_6_8",["赤水市","道真仡佬族苗族自治县","凤冈县","湄潭县","仁怀县","绥阳县","桐梓县","务川仡佬族苗族自治县","习水县","余庆县","正安县","遵义市","遵义县"]); dsy.add("0_6",["安顺地区","毕节地区","贵阳市","六盘水市","黔东南苗族侗族自治州","黔南布依族苗族自治州","黔西南布依族苗族自治州","铜仁地区","遵义地区"]); dsy.add("0_7_7",["市辖区","新华区","秀英区","振东区"]); dsy.add("0_7_15",["市辖区"]); dsy.add("0_7",["白沙黎族自治县","保亭黎族苗族自治县","昌江黎族自治县","澄迈县","儋县","定安县","东方黎族自治县","海口市","乐东黎族自治县","临高县","陵水黎族自治县","南沙群岛","琼海市","琼山县","琼中黎族苗族自治县","三亚市","通什市","屯昌县","万宁县","文昌县","西沙群岛","中沙群岛的岛礁及其海域"]); dsy.add("0_8_0",["安国市","安新县","博野县","定兴县","定州市","阜平县","高阳县","涞水县","涞源县","蠡县","曲阳县","容城县","唐县","完县","望都县","新城县","雄县","徐水县","易县","涿州市"]); dsy.add("0_8_1",["北市区","满城县","南市区","清苑县","市辖区","新市区"]); dsy.add("0_8_2",["泊头市","东光县","海兴县","河间市","黄骅市","孟村回族自治县","南皮县","任丘市","肃宁县","吴桥县","献县","盐山县"]); dsy.add("0_8_3",["沧县","郊区","青县","市辖区","新华区","运河区"]); dsy.add("0_8_4",["丰宁满族自治县","宽城满族自治县","隆化县","滦平县","平泉县","围场满族蒙古族自治县","兴隆县"]); dsy.add("0_8_5",["承德县","市辖区","双滦区","双桥区","鹰手营子矿区"]); dsy.add("0_8_6",["成安县","磁县","大名县","肥乡县","馆陶县","广平县","鸡泽县","临漳县","丘县","曲周县","涉县","魏县","永年县"]); dsy.add("0_8_7",["丛台区","峰峰矿区","复兴区","邯郸县","邯山区","市辖区","武安市"]); dsy.add("0_8_8",["color
分享到:
评论

相关推荐

    超级全面省市县三级级联菜单

    省市县三级级联菜单省市县三级级联菜单省市县三级级联菜单

    省市区三级菜单列表

    在IT行业中,尤其是在Android应用开发领域,"省市区三级菜单列表"是一个常见的需求,它用于模拟现实世界的地理信息,让用户能够方便地选择他们的位置。这个标题所指的是一款具有三级联动效果的菜单,通常用于点餐...

    全国省市县三级下拉菜单EXCEL文件

    在EXCEL中可以实现全国省市县三级下拉菜单选择数据的实现。

    省市县三级菜单

    在IT行业中,"省市县三级菜单"通常是指在软件或网站设计中用于地理位置选择的一种交互方式。这种菜单结构允许用户按顺序选择国家(省)、城市(市)和区县(县),以精确地定位到一个特定的位置。在“华东展示”这个...

    微信小程序-省市县三级联动,带有自定义地区码(源代码+截图)

    微信小程序-省市县三级联动,带有自定义地区码(源代码+截图)微信小程序-省市县三级联动,带有自定义地区码(源代码+截图)微信小程序-省市县三级联动,带有自定义地区码(源代码+截图)微信小程序-省市县三级联动,带有...

    省市县三级、省市二级联动菜单

    同样,当用户在二级菜单中选择一个城市后,三级菜单(区县)会展示与所选城市对应的区县列表。 在提供的压缩包文件中,我们可以看到以下三个文件: 1. `index.html`:这是网页的主文件,通常包含HTML结构以及引用...

    js省市县三级菜单效果

    在JavaScript编程中,省市县三级菜单是一种常见的交互设计,用于用户选择特定的地理位置。这种菜单通常出现在注册、填写地址或定位服务中。本教程将详细解释如何使用JavaScript实现这样的功能,以及需要注意的关键点...

    基于mui写的H5移动端全国地区三级联动菜单

    同理,当用户在二级菜单中做出选择,三级菜单(区县)也会随之更新。这种设计可以减少用户操作,提高交互效率。 “mui”是一个流行的前端开发框架,专注于移动互联网应用,它提供了一系列组件和服务,如导航、下拉...

    省市县三级菜单联动(mysql+ajax+json+php)

    在IT行业中,构建一个省市县三级菜单联动的功能是常见的需求,尤其在网页应用中,用于让用户选择他们的地理位置。本项目采用的技术栈包括MySQL数据库、AJAX异步通信、JSON数据格式以及PHP服务器端编程,这些都是Web...

    jquery省市区三级联动下拉菜单_select三级联动下拉菜单

    jquery省市区三级联动下拉菜单_select三级联动下拉菜单 jquery省市区三级联动下拉菜单_select三级联动下拉菜单 jquery省市区三级联动下拉菜单_select三级联动下拉菜单 jquery省市区三级联动下拉菜单_select三级联动...

    省市县三级联动菜单(asp+access).

    省市县三级联动菜单是一种常见的网页交互设计,常用于地理信息选择,例如在填写地址时,用户依次选择省份、城市和县区,这三个选项之间存在层级关系,并且选择上级菜单后,下级菜单会动态更新。在ASP(Active Server...

    全国省市区三级联动下拉菜单

    全国省市区三级联动下拉菜单是一种常见的前端交互设计,它在网页或应用程序中用于选择地址时,用户可以依次从省、市、区三个级别的下拉菜单中选择,以实现快速定位。这种设计常见于电子商务、物流配送、信息录入等多...

    中国省市县多级联动菜单省份城市县区三级级联菜单

    中国省市县多级联动菜单省份城市县区三级级联菜单,主要使用JAVASCRIPT编写,方便使用,其中在后台调用前台的菜单内容时,可以用Request["ID"] 来获取前台的值。

    全国省市县三级联动菜单

    全国 省市县 无刷新 三级联动菜单,可嵌套在任何一种网页语言中使用。

    Select2实现全国省市区三级联动下拉菜单

    在网页开发中,为了提供用户友好的交互体验,经常需要实现一些动态的、有层次的数据选择功能,例如省市区三级联动下拉菜单。在这种场景下,`Select2` 库是一个非常优秀的工具,它能够帮助开发者创建功能强大、易于...

    全国省市区三级联动下拉菜单.zip

    总结来说,全国省市区三级联动下拉菜单的实现涉及以下关键点: 1. 数据结构的设计,通常为JSON对象或数组。 2. 使用jQuery进行DOM操作和事件监听。 3. 根据用户的选择动态更新下拉菜单选项。 4. 可能包含的样式优化...

    世界主要国家地区的JS三级联动(包括国内的省市区三级联动)

    在本文中,我们将深入探讨如何实现一个包括世界主要国家和地区在内的三级联动效果,以及在国内省市区的三级联动功能。这个功能常用于地址选择、区域筛选等场景,可以提供用户友好的交互体验。 首先,我们要理解什么...

    基于layUI的地区省市区三级联动菜单效果

    当用户选择完三级菜单后,可能需要将选中的数据(如省份、城市、区县的ID或名称)显示在输入框或者提交到服务器。这通常通过JavaScript的DOM操作实现,如设置输入框的值,或者通过AJAX发送HTTP请求将数据传送到后台...

    纯JS写的省市县三级联动菜单

    这个特定的项目,"纯JS写的省市县三级联动菜单",是一个无需使用AJAX,而是直接连接数据库来实现的功能模块。下面我们将深入探讨这个话题。 首先,我们要理解什么是三级联动菜单。它通常包含三个级别的选项,如在这...

Global site tag (gtag.js) - Google Analytics