欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

javawscript 三級菜單的實現(xiàn)原理

 更新時間:2009年07月01日 00:50:17   作者:  
javawscript 三級菜單的實現(xiàn)代碼。
省份:
城市:
區(qū)縣:

省份,城市,區(qū)縣數(shù)據(jù)結構:【名稱,父類ID,當前ID】

 onChange="changelocation2(document.editForm.smalllocation.options[document.editForm.smalllocation.selectedIndex].value)"

根據(jù)selectedIndex取得下一級關聯(lián)菜單的父類ID,

復制代碼 代碼如下:

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('==請選擇==','');
document.getElementById("dlmc0").options[0] = new Option('==請選擇==','');

//alert(locationid);
var locationid=locationid;
var i;
document.editForm.smalllocation.options[0] = new Option('==請選擇==','');
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]);
}
}
}

相關文章

最新評論