国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > JavaScript > 正文

javawscript 三級菜單的實現原理

2024-05-06 14:15:00
字體:
來源:轉載
供稿:網友
省份:
城市:
區縣:

省份,城市,區縣數據結構:【名稱,父類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]);
}
}
}

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 崇州市| 庆安县| 安乡县| 海晏县| 奎屯市| 青冈县| 周至县| 城固县| 奎屯市| 会昌县| 辛集市| 台北市| 天气| 宁都县| 曲水县| 南漳县| 科技| 白城市| 叙永县| 凉城县| 丹江口市| 岚皋县| 子洲县| 耒阳市| 南阳市| 婺源县| 邳州市| 香港| 普格县| 赤壁市| 调兵山市| 锡林浩特市| 财经| 通州市| 沙洋县| 遂溪县| 德江县| 毕节市| 浠水县| 辽源市| 开远市|