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

首頁 > 學(xué)院 > 開發(fā)設(shè)計 > 正文

下拉框連動的小例子(.htm版)

2019-11-18 22:05:57
字體:
供稿:網(wǎng)友
<html>
<head>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script LANGUAGE="javascript">
<!--
var onecount;
onecount=0;
    
subcat = new Array();
subcat[0] = new Array("徐匯區(qū)","01","001");
subcat[1] = new Array("嘉定區(qū)","01","002");
subcat[2] = new Array("黃浦區(qū)","01","003");
subcat[3] = new Array("南昌市","02","004");
subcat[4] = new Array("九江市","02","005");
subcat[5] = new Array("上饒市","02","006");

onecount=6;

function changelocation(locationid)
    {
    document.myform.smalllocation.length = 0;

    var locationid=locationid;
    var i;
    document.myform.smalllocation.options[0] = new Option('====所有地區(qū)====','');
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            {
            document.myform.smalllocation.options[document.myform.smalllocation.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    

//-->
</script>
</head>
<body>
<form name="myform" method="post">
    <select name="biglocation" onChange="changelocation(document.myform.biglocation.options[document.myform.biglocation.selectedIndex].value)">
        <option value="01" selected>上海</option>
        <option value="02">江西</option>
    </select>
    <select name="smalllocation">
        <option selected value="">==所有地區(qū)==</option>
    </select>
</form>
<script LANGUAGE="Javascript">
<!--
    changelocation(document.myform.biglocation.options[document.myform.biglocation.selectedIndex].value);
//-->
</script>
</body>
</html>

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 辽源市| 浦城县| 吉木萨尔县| 修水县| 迭部县| 桂东县| 乐昌市| 东方市| 从化市| 饶阳县| 富民县| 深圳市| 河源市| 岱山县| 周宁县| 博乐市| 桃源县| 和林格尔县| 辽阳县| 河北省| 论坛| 汉川市| 通河县| 四川省| 楚雄市| 双辽市| 菏泽市| 新田县| 康马县| 招远市| 淄博市| 根河市| 调兵山市| 凤山市| 上杭县| 宿迁市| 泸溪县| 灵宝市| 达日县| 万安县| 蒙自县|