| Provinces: |
Please selectShandong Province |
| City: |
= = Please select = =WeihaiDezhouBinzhou |
| District: |
= = Please select township = =WeihaiWendengRongchengRushan |
Provinces, cities, counties Data Structures: "Name, parent class ID, current ID"
Onchange= "Changelocation2 (document.editform.smalllocation.options[ Document.editform.smalllocation.selectedindex].value) "
According to SelectedIndex, get the parent class ID of the next level associated menu,
Copy Code code as follows:
function Changelocation (LocationID)
{
document.editForm.smalllocation.length = 0;
document.editForm.dlmc0.length = 0;
document.getElementById ("Dlmc0"). length=0;
Document.editform.dlmc0.options[0] = new Option (' = = Please select = = ', ');
document.getElementById ("Dlmc0"). Options[0] = new Option (' = = Please select = = ', ');
alert (LocationID);
var Locationid=locationid;
var i;
Document.editform.smalllocation.options[0] = new Option (' = = Please select = = ', ');
For (I=0;i < onecount; i++)
{
if (subcat[i][1] = = LocationID)
{
Document.editform.smalllocation.options[document.editform.smalllocation.length] = new Option (subcat[i][0], subcat[ I][2]);
}
}
}