网页设计问题?急!菜鸟级!
网页设计问题?急!菜鸟级! 现有如下代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/zstz.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_zstz_STRING
Recordset1.Source = "SELECT * FROM GMY.HXX_ZSTZ ORDER BY SBH ASC" (这里我想通过"部门"和“时期”来控制查询的数据)
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 30 (这个数我想通过“显示行数”列表框来控制)
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" c />
<title>无标题文档</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="656" align="center">
<tr>
<td width="145"><label>显示行数:
<select name="xshs" size="1" id="xshs" tabindex="1">
<option value="30">30</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="150">150</option>
<option value="200">200</option>
</select>
</label></td>
<td width="179"><label>部门:
<select name="zsdw" size="1" id="zsdw">
<option value="1001">部门1</option>
<option value="1002">部门2</option>
<option value="1003">部门3</option>
<option value="1004">部门4</option>
</select>
</label></td>
<td width="258">时期:
<label>
<input name="yy" type="text" id="yy" value="2008" size="4" maxlength="4" />
年
<input name="mm" type="text" id="mm" value="1" size="3" maxlength="2" />
月 </label></td>
<td width="54"><input type="submit" name="Submit" value="提交" /></td>
</tr>
</table>
<table border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000" id="tz" style="border-collapse:collapse;">
<tr>
<td>SBH</td>
<td>MC</td>
<td>YYS</td>
<td>CJS</td>
<td>JYF</td>
<td>GRSDS</td>
<td>WHJSF</td>
<td>DFJYF</td>
<td>ZYS</td>
<td>ZNJ</td>
<td>FK</td>
<td>ZT</td>
<td>QXQ</td>
<td>QXZ</td>
<td>FSRQ</td>
</tr>
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %>
<tr>
<td><%=(Recordset1.Fields.Item("SBH").Value)%></td>
<td><%=(Recordset1.Fields.Item("MC").Value)%></td>
<td><%=(Recordset1.Fields.Item("YYS").Value)%></td>
<td><%=(Recordset1.Fields.Item("CJS").Value)%></td>
<td><%=(Recordset1.Fields.Item("JYF").Value)%></td>
<td><%=(Recordset1.Fields.Item("GRSDS").Value)%></td>
<td><%=(Recordset1.Fields.Item("WHJSF").Value)%></td>
<td><%=(Recordset1.Fields.Item("DFJYF").Value)%></td>
<td><%=(Recordset1.Fields.Item("ZYS").Value)%></td>
<td><%=(Recordset1.Fields.Item("ZNJ").Value)%></td>
<td><%=(Recordset1.Fields.Item("FK").Value)%></td>
<td><%=(Recordset1.Fields.Item("ZT").Value)%></td>
<td><%=(Recordset1.Fields.Item("QXQ").Value)%></td>
<td><%=(Recordset1.Fields.Item("QXZ").Value)%></td>
<td><%=(Recordset1.Fields.Item("FSRQ").Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
想当我点提交时,网页可以根据我选择的显示行数 部门 时期来查询相应的数据,不知代码要如何写,本人第一次做网页!谢谢!