中文(简体)
<!-- 把电影观看放在<body>地址中 --> <!-- http://www.downcodes.com --> <!-- bbs http://www.downcodes.com/bbs- -> <SCRIPT LANGUAGE="JavaScript"> <!-- 开始 var arrItems1 = new Array(); var arrItemsGrp1 = new Array(); arrItems1[3] = "卡车"; arrItemsGrp1[3] = 1; arrItems1[4] = "火车"; arrItemsGrp1[4] = 1; arrItems1[5] = "汽车"; arrItemsGrp1[5] = 1; arrItems1[6] = "船"; arrItemsGrp1[6] = 2; arrItems1[7] = "潜艇"; arrItemsGrp1[7] = 2; arrItems1[0] = "飞机"; arrItemsGrp1[0] = 3; arrItems1[1] = "超轻"; arrItemsGrp1[1] = 3; arrItems1[2] = "滑翔机"; arrItemsGrp1[2] = 3; var arrItems2 = new Array(); var arrItemsGrp2 = new Array(); arrItems2[21] = "747"; arrItemsGrp2[21] = 0 arrItems2[22] = "塞斯纳"; arrItemsGrp2[22] = 0 arrItems2[31] = "科尔布传单"; arrItemsGrp2[31] = 1 arrItems2[34] = "Kitfox"; arrItemsGrp2[34] = 1 arrItems2[35] = "施维策滑翔机"; arrItemsGrp2[35] = 2 arrItems2[99] = "雪佛兰迈锐宝"; arrItemsGrp2[99] = 5 arrItems2[100] = "林肯 LS"; arrItemsGrp2[100] = 5 arrItems2[57] = "宝马 Z3"; arrItemsGrp2[57] = 5 arrItems2[101] = "F-150"; arrItemsGrp2[101] = 3 arrItems2[102] = "塔霍"; arrItemsGrp2[102] = 3 arrItems2[103] = "货运列车"; arrItemsGrp2[103] = 4 arrItems2[104] = "旅客列车"; arrItemsGrp2[104] = 4 arrItems2[105] = "油轮"; arrItemsGrp2[105] = 6 arrItems2[106] = "渔船"; arrItemsGrp2[106] = 6 arrItems2[200] = "洛杉矶级"; arrItemsGrp2[200] = 7 arrItems2[201] = "基洛级"; arrItemsGrp2[201] = 7 arrItems2[203] = "海狼级"; arrItemsGrp2[203] = 7 函数 selectChange(control, controlToPopulate, ItemArray, GroupArray) { var myEle ;变量 x ; // 清空第二个下拉框中的任何选项 for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null; if (control.name == "firstChoice") { // 清空第三个下拉框的任何选项 for (var q=myChoices.thirdChoice.options.length;q>=0;q--) myChoices.thirdChoice.options [q] = 空; } // 添加默认选项 - 如果没有值 myEle = document.createElement("option") ; myEle.value = 0 ; myEle.text = "[选择]"; 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) ; } } } // 结束 --> </script> <form name=myChoices> <tablealign="center"> <tr> <td> <SELECT id=firstChoice name=firstChoice onchange="selectChange(this, myChoices. secondaryChoice, arrItems1, arrItemsGrp1);"> <选项值=0 已选择>[选择]</选项> <选项值=1>陆地</选项> <选项值=2>海洋</选项> <选项值=3 >空气</选项> </SELECT> </TD><TD> <SELECT id=secondChoice name=secondChoice onchange="selectChange(this, myChoices.thirdChoice, arrItems2, arrItemsGrp2);"> </SELECT> <SELECT id =thirdChoice 名称=thirdChoice> </SELECT> </TD> </TR> </TABLE> </form>