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

首頁 > 編程 > JavaScript > 正文

javawscript 三級菜單的實現原理

2019-11-21 01:18:04
字體:
來源:轉載
供稿:網友
省份:
城市:
區縣:

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 叶城县| 宿州市| 台湾省| 芜湖市| 芦溪县| 治多县| 资阳市| 格尔木市| 武陟县| 五华县| 德令哈市| 大悟县| 平和县| 临海市| 喀什市| 北宁市| 新平| 水富县| 芦溪县| 夹江县| 保德县| 安仁县| 弥勒县| 静海县| 长沙市| 集安市| 龙泉市| 江城| 前郭尔| 鄂伦春自治旗| 昆明市| 本溪| 福清市| 巴林右旗| 方正县| 东光县| 涞源县| 安顺市| 错那县| 宁安市| 仁怀市|