<body>
<!--
搞一个下拉菜单,还搞一个子下列菜单
-->
<script type="text/javascript">
function changeCity(){
var oSelNodes = document.getElementsByName("select");
//var index = oSelNode.selectedIndex;
len = oSelNodes.length;
alert(len);
}
</script>
<select id="selid" onchange="changeCity()">
<option>请选择城市</option>
<option>湖北</option>
<option>江西</option>
<option>广东</option>
</select>
<select id="subselid">
<option>请选择省市</option>
<option>湖北</option>
<option>江西</option>
<option>广东</option>
<option>北京</option>
</select>
</body> |