Menu | Linkage Menu | detailed <html>
<head>
</head>
<body>
<script language= "JavaScript" >
<!--
var subcat = new Array ();
subcat[0] = new Array (' 10 ', ' 1 ', ' = 1 ')
subcat[1] = new Array (' 10 ', ' 2 ', ' = 2 ')
subcat[2] = new Array (' 10 ', ' 3 ', ' = 3 ')
subcat[3] = new Array (' 10 ', ' 4 ', ' = 4 ')
subcat[4] = new Array (' 10 ', ' 5 ', ' = 5 ')
subcat[5] = new Array (' 10 ', ' 6 ', ' = 6 ')
subcat[6] = new Array (' 10 ', ' 7 ', ' = 7 ')
subcat[7] = new Array (' 10 ', ' 8 ', ' = 8 ')
subcat[8] = new Array (' 10 ', ' 9 ', ' = 9 ')
subcat[9] = new Array (' 10 ', ' 10 ', ' = 10 ')
subcat[10] = new Array (' 20 ', ' 11 ', ' = 11 ')
subcat[11] = new Array (' 20 ', ' 12 ', ' = 12 ')
subcat[12] = new Array (' 20 ', ' 13 ', ' = 13 ')
subcat[13] = new Array (' 20 ', ' 14 ', ' = 14 ')
SUBCAT[14] = new Array (' 20 ', ' 15 ', ' = 15 ')
subcat[15] = new Array (' 20 ', ' 16 ', ' = 16 ')
subcat[16] = new Array (' 20 ', ' 17 ', ' = 17 ')
subcat[17] = new Array (' 20 ', ' 18 ', ' = 18 ')
subcat[18] = new Array (' 20 ', ' 19 ', ' = 19 ')
subcat[19] = new Array (' 20 ', ' 20 ', ' = 20 ')
function Changeselect1 (LocationID)
{
document.form1.s2.length = 0; Initialize the Drop-down list to clear the Drop-down data
Document.form1.s2.options[0] = new Option (' = = Please select = = ', '); Give the first value
for (i=0 i<subcat.length; i++)//legth=20
{
if (subcat[i][0] = = LocationID)//[0] [1] The first column is the second column
{Document.form1.s2.options[document.form1.s2.length] = new Option (subcat[i][1], subcat[i][2]); Set option
//The first time length=1 because have = = Please choose = =
//i=9 when length= 10 value has 11 because from 0 subcat[i][0] = = LocationID Mask and write
}
}
//-->
</script>
<form name= "Form1" >
Two-level linkage:
<select name= "S1" onchange= "Changeselect1 (this.value)" >
<option>== Please select ==</option>
<option value= "Ten" >1-10</option>
<option value= ">11-20</option>
"
</select>
<select name= "S2" onchange= "alert (this.value)" >
<option>== Please select ==</option>
</select>
</form>