The value of getting a drop-down box in JS is really cost to spend a lot of chapters, compared to the ASP. Net is more trouble more.
list title>
VAR OneCount;
OneCount = 0;
Subcat = new array ();
Subcat [0] = New Array ("Xuhui District", "01", "001");
Subcat [1] = New Array ("Jiading District", "01", "002");
Subcat [2] = New Array ("Huangpu District", "01", "003");
Subcat [3] = New Array ("Nanchang", "02", "004");
Subcat [4] = New Array ("Jiujiang", "02", "005");
Subcat [5] = New Array ("Shangrao City", "02", "006");
OneCount = 6;
Function ChangeLocation (locationID)
{
Document.myform.smallLocation.Length = 0;
Var locationId = locationID;
Var i;
Document.myform.smallLocation.Options [0] = new option ('==== all regions ====', '');
For (i = 0; i
{
IF (Subcat [I] [1] == locationID)
{
Document.myform.smallLocation.Options [Document.myform.smallLocation.Length]
= New option (SUBCAT [I] [0], SUBCAT [I] [2]);
}
}
}
// ->
Script>
HEAD>