Indonesia
<!-- 把下列代码加到<body>区域中 --> <!-- 二级联动 Mulai --> <script bahasa="JavaScript"> <!-- var subcat = new Array(); subkucing[0] = Array baru('10','1','=1') subkucing[1] = Array baru('10','2','=2') subkucing[2] = Array baru( '10','3','=3') subkucing[3] = Array baru('10','4','=4') subkucing[4] = Array baru('10','5', '=5') subkucing[5] = Array baru('10','6','=6') subkucing[6] = Array baru('10','7','=7') subkucing[7 ] = Array baru('10','8','=8') subkucing[8] = Array baru('10','9','=9') subkucing[9] = Array baru('10' ,'10','=10') subcat[10] = Array baru('20','11','=11') subcat[11] = Array baru('20','12','=12 ') subkucing[12] = Array baru('20','13','=13') subkucing[13] = Array baru('20','14','=14') subkucing[14] = baru Array('20','15','=15') subcat[15] = Array baru('20','16','=16') subcat[16] = Array baru('20','17 ','=17') subkucing[17] = Array baru('20','18','=18') subkucing[18] = Array baru('20','19','=19') subkucing [19] = array baru('20','20','=20') fungsi changeselect1(locationid) { document.form1.s2.length = 0; document.form1.s2.options[0] = new Option('==请选择==',''); for (i=0; i<subcat.length; i++) { if (subcat[i][0] == locationid) {document.form1.s2.options[document.form1.s2.length] = Opsi baru(subcat [i][1], subcat[i][2]);} } } //--> </script> <form name="form1"> 二级联动: <select name="s1" onChange=" changeselect1(this.value)"> <option>==请选择==</option> <option value="10">1-10</option> <option value="20">11-20</option > </select> <select name="s2" onChange="alert(this.value)"> <option>==请选择==</option> </select> </form> <!-- 二级联动 Selesai --> <!-- 三级联动 Mulai --> <script bahasa="JavaScript"> <!-- var subval = new Array(); subval[0] = Array baru('10','单数','1','=1') subval[1] = Array baru('10','双数','2','=2' ) subval[2] = Array baru('10','单数','3','=3') subval[3] = Array baru('10','双数','4','=4 ') subval[4] = Array baru('10','单数','5','=5') subval[5] = Array baru('10','双数','6','= 6') subval[6] = Array baru('10','单数','7','=7') subval[7] = Array baru('10','双数','8',' =8') subval[8] = Array baru('10','单数','9','=9') subval[9] = Array baru('10','双数','10', '=10') subval[10] = Array baru('20','单数','11','=11') subval[11] = Array baru('20','双数','12' ,'=12') subval[12] = Array baru('20','单数','13','=13') subval[13] = Array baru('20','双数','14 ','=14') subval[14] = Array baru('20','单数','15','=15') subval[15] = Array baru('20','双数',' 16','=16') subval[16] = Array baru('20','单数','17','=17') subval[17] = Array baru('20','双数', '18','=18') subval[18] = Array baru('20','单数','19','=19') subval[19] = Array baru('20','双数' ,'20','=20') fungsi changeselect2() { document.form2.s2.length = 0; document.form2.s2.options[0] = new Option('==请选择==',''); document.form2.s2.options[1] = Opsi baru('选择单数','单数'); document.form2.s2.options[2] = Opsi baru('选择双数','双数'); dokumen.form2.s3.length = 0; document.form2.s3.options[0] = new Option('==请选择==',''); } fungsi ubahpilih3(sub1,sub2) { dokumen.form2.s3.panjang = 0; document.form2.s3.options[0] = new Option('==请选择==',''); for (i=0; i<subval.length; i++) { if ((subval[i][0] == sub1) & (subval[i][1] == sub2)) {document.form2.s3. pilihan[dokumen.form2.s3.panjang] = opsi baru(subval[i][2], subval[i][3]);} } } //--> </script> <form name="form2" > 三级联动: <select name="s1" onChange="changeselect2()"> <option>==请选择==</option> <option value="10">1-10</option> <option value="20">11-20</option> </select> <select name="s2" onChange="changeselect3(document.form2.s1.value,this.value)"> <option>==请选择==</option> </select> <select name="s3" onChange="alert(this.value)"> <option>==请选择==</option> </select> </form> < !-- 三级联动 Selesai -->