标签:style blog http color os io ar for art
<script> var arr = new Array; arr[0] = [ new Option("--请选择市--", "-1") ]; arr[1] = [ new Option("烟台", "6"), new Option("青岛", "2"), new Option("济南", "1") ]; arr[2] = [ new Option("长沙", "1"), new Option("岳阳", "6") ]; function change(index) { $(‘city‘).innerHTML = ‘‘; for (i = 0; i < arr[index].length; i++) { $(‘city‘).options[i] = arr[index][i]; } } </script>
<tr> <td>所在地区:</td> <td> <select name="province" style="width:120px;" onchange="change(this.selectedIndex);"> <option value="-1">--请选择省--</option> <option value="37">山东</option> <option value="43">湖南</option> </select> <select id="city" name="city" style="width:120px;"> <option value="-1">--请选择市--</option> </select> </td> </tr>
标签:style blog http color os io ar for art
原文地址:http://www.cnblogs.com/manusas/p/3951298.html