<td width="100" height="34" class="font04"><img src="../image/20080101164358722.gif" width="11" height="11" /> 快速筛选:</td> <td height="34" width="100"> <% String sql_Dq1 = "select * from Class where Class_F = '13' order by id asc" ; ResultSet rs_Dq1 = stmt.executeQuery(sql_Dq1); %> <select name="classid" onChange="changelocation(document.mform.classid.options[document.mform.classid.selectedIndex].value)" onFocus="return info('div_Nclassid'); " onBlur="return info_no('div_Nclassid')"> <% out.println("<option value='0' selected>所有省份</option>"); while(rs_Dq1.next()) { out.println("<option value='"+rs_Dq1.getString(1)+"'>"+rs_Dq1.getString(2)+"</option>"); } if (rs_Dq1.next()) {}else{ out.print("没有记录"); } rs_Dq1.close(); %></select> </TD> <script language = "JavaScript"> var onecount; onecount=0; subcat = new Array(); <% String sql_Dq2 = "select * from Class where Class_F <> '0'" ; ResultSet rs_Dq2 = stmt2.executeQuery(sql_Dq2); int count = 0; while(rs_Dq2.next()) { %> subcat[<%=count%>] = new Array("<%= rs_Dq2.getString("Class_Name")%>","<%= rs_Dq2.getString("Class_F")%>","<%= rs_Dq2.getString("id")%>"); <% count = count + 1; } rs_Dq2.close(); stmt2.close(); %> onecount=<%=count%>;function changelocation(locationid) { obj=document.mform; obj.Nclassid.length = 1;
var locationid=locationid; var i; for (i=0;i < onecount; i++) { if (subcat[i][1] == locationid) { obj.Nclassid.options[obj.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]); } }
楼主【wanchengzi】截止到2008-07-17 00:22:42的历史汇总数据(不包括此帖):
发帖的总数量:2 发帖的总分数:40 每贴平均分数:20
回帖的总数量:0 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:1 结贴的总分数:20
无满意结贴数:0 无满意结贴分:0
未结的帖子数:1 未结的总分数:20
结贴的百分比:50.00 % 结分的百分比:50.00 %
无满意结贴率:0.00 % 无满意结分率:0.00 %
楼主加油
自己搜索一下吧
代码不在身边,晚上给你贴出来.
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" height="34" class="font04"><img src="../image/20080101164358722.gif" width="11" height="11" /> 快速筛选:</td>
<td height="34" width="100">
<%
String sql_Dq1 = "select * from Class where Class_F = '13' order by id asc" ;
ResultSet rs_Dq1 = stmt.executeQuery(sql_Dq1);
%>
<select name="classid" onChange="changelocation(document.mform.classid.options[document.mform.classid.selectedIndex].value)" onFocus="return info('div_Nclassid'); " onBlur="return info_no('div_Nclassid')">
<%
out.println("<option value='0' selected>所有省份</option>");
while(rs_Dq1.next()) {
out.println("<option value='"+rs_Dq1.getString(1)+"'>"+rs_Dq1.getString(2)+"</option>");
}
if (rs_Dq1.next()) {}else{
out.print("没有记录");
}
rs_Dq1.close();
%></select> </TD>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
String sql_Dq2 = "select * from Class where Class_F <> '0'" ;
ResultSet rs_Dq2 = stmt2.executeQuery(sql_Dq2);
int count = 0;
while(rs_Dq2.next()) {
%>
subcat[<%=count%>] = new Array("<%= rs_Dq2.getString("Class_Name")%>","<%= rs_Dq2.getString("Class_F")%>","<%= rs_Dq2.getString("id")%>");
<%
count = count + 1;
}
rs_Dq2.close();
stmt2.close();
%>
onecount=<%=count%>;function changelocation(locationid)
{
obj=document.mform;
obj.Nclassid.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
obj.Nclassid.options[obj.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<TD width="100" height="34" align="left"><select name=Nclassid id="Nclassid" onFocus="return info('div_Nclassid'); "onBlur="return info_no('div_Nclassid');">
<option value="0" selected>所有城市</option>
</select></TD>
<td width="100"></td>
<td width="100"></td>
<td width="100"></td>
<td width="100" class="STYLE4" ><img src="../image/20080101163413966.gif" width="13" height="13" />
<INPUT type=submit value=" 筛选 " name="submit" onClick="return checkdata();">
</td>
</tr>
</table>