这样的行不行
[CODE]<script language="JavaScript">
function bb(num){
city = new Array();
//读数据库生成数组
city[1]= new Array("河北地区","hebei","1");
city[2]= new Array("北京地区","beijing","2");
city[3]= new Array("上海地区","shanghai","3");
form1.tt1.value=city[num][0];
form1.tt2.value=city[num][1];
}
</script>
<body>
<center>
<form name="form1" method="post" action="">
<!--form1.ss的值用数据库读出-->
选择查找的省市
<select name="ss" onChange="bb(document.form1.ss.options[document.form1.ss.selectedIndex].value)">
<option value="0">请选择</option>
<option value="1">河北省</option>
<option value="2">北京市</option>
<option value="3">上海市</option>
</select>
<br>
地区
<input name="tt1" type="text">
<br>
英文
<input name="tt2" type="text">
</form>
</center>
</body>[/CODE]
代码
<script language="JavaScript">
function bb(num){
city = new Array();
//读数据库生成数组
city[1]= new Array("河北地区","hebei","1");
city[2]= new Array("北京地区","beijing","2");
city[3]= new Array("上海地区","shanghai","3");
form1.tt1.value=city[num][0];
form1.tt2.value=city[num][1];
}
</script>
<body>
<center>
<form name="form1" method="post" action="">
<!--form1.ss的值用数据库读出-->
选择查找的省市
<select name="ss" onChange="bb(document.form1.ss.options[document.form1.ss.selectedIndex].value)">
<option value="0">请选择</option>
<option value="1">河北省</option>
<option value="2">北京市</option>
<option value="3">上海市</option>
</select>
<br>
地区
<input name="tt1" type="text">
<br>
英文
<input name="tt2" type="text">
</form>
</center>
</body>