| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 413 人关注过本帖
标题:网页设计问题?急!菜鸟级!
取消只看楼主 加入收藏
lbdsamw
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-8-2
收藏
 问题点数:0 回复次数:0 
网页设计问题?急!菜鸟级!
网页设计问题?急!菜鸟级!
现有如下代码:

<%@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>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</form>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
想当我点提交时,网页可以根据我选择的显示行数 部门 时期来查询相应的数据,不知代码要如何写,本人第一次做网页!谢谢!
搜索更多相关主题的帖子: 网页设计问题 菜鸟级 
2008-08-02 14:16
快速回复:网页设计问题?急!菜鸟级!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027082 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved