色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

javawscript 三級菜單的實現原理

省份:
城市:
區縣:

省份,城市,區縣數據結構:【名稱,父類ID,當前ID】

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

根據selectedIndex取得下一級關聯菜單的父類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]);
}
}
}

JavaScript技術javawscript 三級菜單的實現原理,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 呼玛县| 九龙城区| 汾西县| 乌鲁木齐市| 大同县| 读书| 西盟| 静海县| 赤峰市| 新沂市| 论坛| 申扎县| 七台河市| 凤凰县| 红河县| 柳州市| 天门市| 蒙城县| 山阴县| 诸城市| 邹城市| 北宁市| 兴山县| 乌拉特中旗| 谷城县| 任丘市| 宣武区| 平凉市| 汕尾市| 布尔津县| 北辰区| 道孚县| 柞水县| 措美县| 贡嘎县| 县级市| 鄂伦春自治旗| 孟连| 吉安县| 定结县| 那曲县|