帮助中心
简洁旧版连接
新手必读
如何上传
获取设计币
评分标准
→ 设计欣赏
→ 矢量素材
→ 网页素材
→ 网页模板
→ 图片素材
→ 设计字体
→ 软件代码
→ 设计教程
→ 设计公司
网站首页
源文件库
矢量图库
网页模版
高清图片
佳作欣赏
桌面壁纸
设计教程
简洁论坛
设计空间
广告代码
综合代码
其他代码
焦点图
全屏广告
对联广告
在线客服
相册代码
菜单导航
TAB标签
悬浮漂浮
视频播放
图片特效
翻牌书角
网页特效
导航菜单
表格图层
其他代码
文字相关
表单按钮
选项卡相关
杰克专栏
图象动画
网站制作
上传下载
服务器软件
网吧相关
常用软件
当前位置:
简洁设计网
>
网站代码
>
网页特效
>
其他代码
> 代码信息
三级关联菜单js代码
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin var arrItems1 = new Array(); var arrItemsGrp1 = new Array(); arrItems1[3] = "Truck"; arrItemsGrp1[3] = 1; arrItems1[4] = "Train"; arrItemsGrp1[4] = 1; arrItems1[5] = "Car"; arrItemsGrp1[5] = 1; arrItems1[6] = "Boat"; arrItemsGrp1[6] = 2; arrItems1[7] = "Submarine"; arrItemsGrp1[7] = 2; arrItems1[0] = "Planes"; arrItemsGrp1[0] = 3; arrItems1[1] = "Ultralight"; arrItemsGrp1[1] = 3; arrItems1[2] = "Glider"; arrItemsGrp1[2] = 3; var arrItems2 = new Array(); var arrItemsGrp2 = new Array(); arrItems2[21] = "747"; arrItemsGrp2[21] = 0 arrItems2[22] = "Cessna"; arrItemsGrp2[22] = 0 arrItems2[31] = "Kolb Flyer"; arrItemsGrp2[31] = 1 arrItems2[34] = "Kitfox"; arrItemsGrp2[34] = 1 arrItems2[35] = "Schwietzer Glider"; arrItemsGrp2[35] = 2 arrItems2[99] = "Chevy Malibu"; arrItemsGrp2[99] = 5 arrItems2[100] = "Lincoln LS"; arrItemsGrp2[100] = 5 arrItems2[57] = "BMW Z3"; arrItemsGrp2[57] = 5 arrItems2[101] = "F-150"; arrItemsGrp2[101] = 3 arrItems2[102] = "Tahoe"; arrItemsGrp2[102] = 3 arrItems2[103] = "Freight Train"; arrItemsGrp2[103] = 4 arrItems2[104] = "Passenger Train"; arrItemsGrp2[104] = 4 arrItems2[105] = "Oil Tanker"; arrItemsGrp2[105] = 6 arrItems2[106] = "Fishing Boat"; arrItemsGrp2[106] = 6 arrItems2[200] = "Los Angelas Class"; arrItemsGrp2[200] = 7 arrItems2[201] = "Kilo Class"; arrItemsGrp2[201] = 7 arrItems2[203] = "Seawolf Class"; arrItemsGrp2[203] = 7 function selectChange(control, controlToPopulate, ItemArray, GroupArray) { var myEle ; var x ; // Empty the second drop down box of any choices for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null; if (control.name == "firstChoice") { // Empty the third drop down box of any choices for (var q=myChoices.thirdChoice.options.length;q>=0;q--) myChoices.thirdChoice.options[q] = null; } // ADD Default Choice - in case there are no values myEle = document.createElement("option") ; myEle.value = 0 ; myEle.text = "[SELECT]" ; controlToPopulate.add(myEle) ; for ( x = 0 ; x < ItemArray.length ; x++ ) { if ( GroupArray[x] == control.value ) { myEle = document.createElement("option") ; myEle.value = x ; myEle.text = ItemArray[x] ; controlToPopulate.add(myEle) ; } } } // End --> </script> <form name=myChoices> <table align="center"> <tr> <td> <SELECT id=firstChoice name=firstChoice onchange="selectChange(this, myChoices.secondChoice, arrItems1, arrItemsGrp1);"> <option value=0 SELECTED>[SELECT]</option> <option value=1>Land</option> <option value=2>Sea</option> <option value=3>Air</option> </SELECT> </TD><TD> <SELECT id=secondChoice name=secondChoice onchange="selectChange(this, myChoices.thirdChoice, arrItems2, arrItemsGrp2);"> </SELECT> <SELECT id=thirdChoice name=thirdChoice> </SELECT> </TD> </TR> </TABLE> </form>
提示:您可以先修改部分代码再运行
相关网站代码
·
三级关联菜单js代码
·
点击按钮自动复制代码
·
JavaScript 图片滚动(绝对酷)
·
贪吃蛇游戏(兼容IE和FF)javascript/ajax代
·
有前页后页中间页的Javascript分页代码
·
超酷的滚动条有纹理背景效果的JS代码
·
支持用按键盘方向键来实现翻页跳转的JS代码
·
20秒后返回首页的页面进度条效果
·
简洁的loading 效果JS代码
·
CSS框架样式代码
·
将网页设为浏览器首页或起始页或默认页
·
简单的滑动门代码
·
纯CSS特意选项卡_选项卡在右面
·
代码不多的滑动门代码
·
可以计算星座属相的JS代码
·
显示文字的日期星期时间的JS代码
·
挂历的时间显示
·
显示特殊节日脚本(做一个朋友生日记事可最好
·
军用AM/PM时间显示Script
·
网页上漂浮的花瓣
设为首页
|
加入收藏
|
关于我们
|
联系我们
|
合作伙伴
|
使用协议
|
广告联系
|
内页友情链接
|
网站地图
Copyright 2008-2015
Www.Jianjie8.Com
All Rights Reserved 版权所有 简洁设计网 [
www.jianjie8.com
]
鲁ICP备09002350号