蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 http://www.lslnet.com 2006年8月25日 8:28

request()能取得?xxx=xxx吗

我昨天问的有个人手行
可是我今天是不行的啊
request()能取得?xxx=xxx吗

a.htm
<a href=aaa.asp?id=1>
b.asp
id=request("id")

Request.ServerVariables("QUERY_STRING")
获取当前URL地址后面的所有参数及值

不是的
我就想问
request()能不能取得?sss=UIu

谢谢各位

<a href="sell_reportmanage.asp?page=1&fzr=<%=fzr%>&starttime=<%=starttime%>&endtime=<%=endtime%>&hkzt=<%=hkzt%>" title="首页">&lt;&lt;</a>



fzr=request("fzr")
  starttime=request("start_time")
  endtime=request("end_time")
  hkzt=request("hkzt")

帮俺看看是哪有错误啊
我就这样取行吗
还是那个连接有错误啊

fzr=request("fzr")
starttime=request("starttime")
endtime=request("endtime")
hkzt=request("hkzt")

啊噢
request自己不能。
不过可以通过ServerVariables获取

warran在上个帖子中说


您这个是啥意思啊


For Each name IN Request.ServerVariables

Response.write("<p><b>"&name&"</b>:")

Response.write(Request.ServerVariables(name))

NEXT
这个查看一下就知道了

request可以的啊,我就这样用的。不过这样好像稍微影响些运行速度,因为扩展了查询范围。

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="openwindow.js"-->
<%'判断SQL条件查询
  fzr=request("fzr")
  starttime=request("start_time")
  endtime=request("end_time")
  hkzt=request("hkzt")
  if fzr="" and hkzt="" and (starttime="" or endtime="") then
    sqlwhere=""
  else
    sqlwhere="where 1=1"
  end if
  if fzr<>"" then
    sqlwhere=sqlwhere&" and g_fzr='"&fzr&"'"
  end if
  if hkzt<>"" then
    sqlwhere=sqlwhere&" and g_hkzt='"&hkzt&"'"
  end if
  if starttime<>"" or endtime<>"" then
    sqlwhere=sqlwhere& "and g_xsrq between #"&starttime&"# and #"&endtime&"#"
  end if
  sql="select * from gexiaoshou "&sqlwhere&" order by g_lrsj desc"
  set rs=server.CreateObject("adodb.recordset")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<style type="text/css">
<!--
body,td,th {
        font-size: 12px;
}
.style1 {color: #FFFFFF}
a:link {
        color: #FFFFFF;
}
a:visited {
        color: #FFFFFF;
}
a:hover {
        color: #CCCCCC;
}
-->
</style><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>个人销售报表管理</title>
</head>
<body>
<table width="675" height="86" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2">
        <form action="sell_reportmanage.asp" method="post" name="fm" id="fm">
      <table width="675" height="76" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>开始时间</td>
          <td width="252"><input class=text100 type="text" name="start_time"  maxlength=10   value="<%if request("start_time")<>"" then response.Write(request("start_time"))%>">
            <input name="Button2" type="button" class="button_dic" id="Button22" onClick="show_calendar('fm.start_time')" value="…"></td>
          <td width="66">结束时间</td>
          <td width="286"><input class=text100 type="text" name="end_time" maxlength=10  value="<%if request("end_time")<>"" then response.Write(request("end_time"))%>">
            <input name="Button3" type="button" class="button_dic" id="Button32" onClick="show_calendar('fm.end_time')" value="…"></td>
        </tr>
        <tr>
          <td width="71">负 责 人</td>
          <td><select name="fzr" id="fzr">
              <option value="" selected>负责人</option>
              <%'从数据库中选择负责人
                  sqlf="select f_name,f_area from fuzeren"
                  set rsf=server.CreateObject("adodb.recordset")
                  rsf.open sqlf,conn,1,3
                  if rsf.eof then
                    response.write"<option value=无负责人 >无负责人</option>"
              else
                  do while not rsf.eof%>
                   <option value="<%=rsf("f_name")%>" <% if rsf("f_name")=fzr then response.write"selected"%>><%=rsf("f_name")%></option>
                <%rsf.movenext
                  loop
                  end if
                  rsf.close
                  set rsf=nothing
                %>
            </select>
                  </td>
          <td>回款状态</td>
          <td><input type="radio" name="hkzt" value="未回款" <%if hkzt="未回款" then response.write "checked"%>>
            未回款
              <input type="radio" name="hkzt" value="全部回款" <%if hkzt="全部回款" then response.write "checked"%>>
            全部回款
              <input type="radio" name="hkzt" value="部分回款" <%if hkzt="部分回款" then response.write "checked"%>>
            部分回款</td>
        </tr>
        <tr>
          <td height="20" colspan="4"><div align="center">
            <input type="submit" name="Submit" value="搜 索">
          </div></td>
        </tr>
        <tr>
          <td colspan="4"><hr size="1"></td>
          </tr>
      </table>
    </form></td>
  </tr>
</table>
<table width="675" height="72" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
  <tr bgcolor="#666666">
    <td width="71" height="28" class="xl29"><div align="center" class="style1">销售时间 </div></td>
    <td width="122" class="xl30"><div align="center" class="style1">购货单位 </div></td>
    <td width="67" class="xl31"><div align="center" class="style1">销售金额 </div></td>
    <td width="68" class="xl29"><div align="center" class="style1">回款金额</div></td>
    <td width="72" class="xl29"><div align="center" class="style1">回款日期 </div></td>
    <td width="72" class="xl30"><div align="center" class="style1">负责人 </div></td>
    <td width="64" class="xl30"><div align="center" class="style1">市场划分</div></td>
    <td width="64" class="xl30"><div align="center" class="style1">回款状态</div></td>
    <td width="73" class="xl30"><div align="center" class="style1">执行操作</div></td>
  </tr>
  <%
  rs.open sql,conn,1,3
  rs.pagesize=2
  page=cint(request.QueryString("page"))
  if page<1 or page="" then page=1
  if page>rs.pagecount then page=rs.pagecount
  rs.absolutepage=page
  for i=1 to rs.pagesize
    if rs.eof then exit for
  %>
  <tr bgcolor="#FFFFFF">
    <td height="21" class="xl32"><div align="left"><%=rs("g_xsrq")%></div></td>
    <td class="xl28"><div align="left"><%=rs("g_ghdw")%></div></td>
    <td align="right" class="xl27"><div align="center"><%=rs("g_ysk")%>¥</div></td>
    <td class="xl33"><div align="center"><%if rs("g_yisk")="" then
                                                 response.write 0
                                                                                   else
                                                                                     response.write rs("g_yisk")
                                                                                   end if
                                               %>¥</div></td>
    <td class="xl33"><div align="center"><%if rs("g_hkrq")<>"" then
                                                 response.write rs("g_hkrq")
                                                                                   else
                                                                                     response.write "<font color=red>×</font>"
                                                                                   end if%></div></td>
    <td class="xl30"><div align="center"><%=rs("g_fzr")%></div></td>
    <td class="xl30"><div align="center"><%=rs("g_schf")%></div></td>
    <td class="xl30"><div align="center"><%=rs("g_hkzt")%></div></td>
    <td bgcolor="#666666" class="xl30"><div align="center"><a href="sell_updatereport.asp?id=<%=rs("g_id")%>">修改</a> </div></td>
  </tr>
  <%rs.movenext
    next
  %>
  <tr bgcolor="#666666">
   <td height="21" colspan="9" class="xl32">   <div align="right">   <span class="style1">
   共<%=rs.pagecount%>页 共条<%=rs.recordcount%>记录
   当前<%=page%>/<%=rs.pagecount%> 
   </span>
   <a title="首页"  href="sell_reportmanage.asp?fzr=<%=fzr%>& starttime=<%=starttime%>& endtime=<%=endtime%>& hkzt=<%=hkzt%>&page=1" >&lt;&lt;</a>
   <a title="上一页" href="sell_reportmanage.asp?fzr=<%=fzr%>& starttime=<%=starttime%>& endtime=<%=endtime%>& hkzt=<%=hkzt%>& page=<%=(page-1)%>">&lt;--</a>
   <a title="下一页" href="sell_reportmanage.asp?fzr=<%=fzr%>& starttime=<%=starttime%>& endtime=<%=endtime%>& hkzt=<%=hkzt%>& page=<%=(page+1)%>">--&gt;</a>   
   <a title="尾页"  href="sell_reportmanage.asp?fzr=<%=fzr%>& starttime=<%=starttime%>& endtime=<%=endtime%>& hkzt=<%=hkzt%>& page=<%=rs.pagecount%>">&gt;&gt;</a>
        </div>
        <%'=fzr&starttime&endtime&hkzt%>
   </td>
  </tr>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
分页就出现错误




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com