28,391
社区成员
发帖
与我相关
我的任务
分享
<script language = "javascript">
var j;
j=0;
info = new Array();
<%set rs=conn.execute("select * from smallinfo order by ID desc")
if rs.eof then%>
info[0] = new Array("无小类","","");
<%else
i=0
do while not rs.eof
%>
info[<%=i%>] = new Array("<%=rs("smallname")%>","<%=rs("bigid")%>","<%=rs("id")%>");
<%rs.movenext
i=i+1
loop
end if
rs.close
%>
j=<%=i%>;
function changelocation1(locationid){
document.form1.scid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < j; i++){
if (info[i][1] == locationid){
document.form1.scid.options[document.form1.scid.length] = new Option(info[i][0], info[i][2]);
}
}
}
</script>
<form action='' method=POST name="form1">
<table border='0' align='center' cellpadding='0' cellspacing='0' width="100%">
<tr bgcolor="#FFFFFF">
<td align="right"><strong>新闻类别</strong></td>
<td ><select name="bcid" size="1" class="input1" onChange="changelocation1(document.form1.bcid.options[document.form1.bcid.selectedIndex].value)">
<%set rs=conn.execute("select * from biginfo order by ID desc")
if rs.recordcount=0 then%>
<option selected value="">无类别</option>
<%else%>
<option selected value="">请选择大类</option>
<%do while not rs.eof%>
<option value="<%=rs("id")%>"><%=rs("bigname")%></option>
<%rs.movenext
loop
end if%>
</select>
<!--//////////////////////////City_select下拉列表//////////////////////////-->
<select name="scid" class="input1">
<option selected value="">请指定小类</option>
</select>
<font color=#ff0000>*</font></td>
</tr>
</table>