怎样返回到上级页面

zhanghua4109 2004-08-28 11:00:31
<!--#include file="adovbs.inc"-->
<!-- #include file="cnn.asp" -->
<%
dim city
city=request.form("city")
city=request.querystring("city")
Session("city")=city
cid=request.querystring("cid")
session("cid")=cid
set rst=cnn.execute("selectreccoach3 "&Session("city")&" ",,adcmdtext)
set rst1=cnn.execute("fare",,adcmdtable)
set rst2=cnn.execute("Report_fare",,adcmdtable)
%>

<%=Session("cid")%>
<html>
<body>
<table width="557">
<tr>
<td width="204">
<div align="left" style="width: 204; height: 66"> 
<form name="form1" method="post"

action="http://localhost/zh/index.asp?city=<%=Session("city")%>">
<p>时间查询:
<select size="1" name="lstfld">
<option selected value="jt">今天</option>
<option value="mt">明天</option>
<option value="zt">昨天</option>
</select>  <input name="btnsubmit" type="submit" value="查询">
</p>
</form>
</div>
</td>
<td width="339">
<p align="right"><a href="http://localhost/zh/CPCHECK.asp?cid=+cid">返回</a>
</td>
</tr>
</table>
<%
dim field
field=request.form("lstfld")
if field="jt" then
set rst=cnn.execute("selectreccoach3 " & Session("city")& "",,adcmdtext)
end if
if field="mt" then
set rst=cnn.execute("selectreccoach " & Session("city")& "",,adcmdtext)
end if
if field="zt" then
set rst=cnn.execute("selectreccoach2 " & Session("city")& "",,adcmdtext)
end if
%>
<%if rst.eof then%>
<p><font color="red">当前没有您所要的数据!</font></p>
<%else%>
     
<table cellspacing="3" cellpadding="3" width="100%" border="1" align="center">
<tr align="center" bgcolor="">
<td><font color="#">车次</font></td>
<td><font color="#">发车时间</td>
<td><font color="#">车型</td>
<td><font color="#">终点</td>
<td><font color="#">价格</td>
<td><font color="#">有无票</td>
<td><font color="#">途经站点</td>
</tr>
<%while not rst.eof%>

<tr bgcolor="">
<td align="center"><%=rst("coach")%></td>
<td><%=rst("run_time")%></td>
<td align="center"><%=rst("typename")%></td>
<td align="center"><%=rst("terminal")%></td>
<td align="center"><%=rst1("price")%></td>
<td align="center"><%if rst("leaves")>0 then %>有
<%else%>无
<%end if%></td>
<td><%=rst2("station")%></td>
</tr>
<%
rst.movenext
wend
%>
</table>
<%end if%>
</body>
</html>现在我要在这个页面里,做个“返回“链接,但里的cid是上上页面的,怎样得到。请高手指点。
...全文
300 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
mrshelly 2004-08-28
  • 打赏
  • 举报
回复
history(-1);???
colinliu 2004-08-28
  • 打赏
  • 举报
回复
<a href="javascript:history.back();>返回</a>

<a href="javascript:window.go(-1);>返回</a>
zltostem 2004-08-28
  • 打赏
  • 举报
回复
<a href="javascript:history.back(1);>返回</a>

or

前一画面名: xx.asp
<a href="window.location.href="xx.asp";>返回</a>
yooxee 2004-08-28
  • 打赏
  • 举报
回复
不更新内容
<script languge=javascript>
history.go(-1)
</script>

更新内容
<script languge=javascript>
window.location="<% request.servervariables("http_hrererer") %>"
</script>
fashchina 2004-08-28
  • 打赏
  • 举报
回复
同意
mrshelly 2004-08-28
  • 打赏
  • 举报
回复
<font color="red">当前没有您所要的数据! 请<a href="JavaScript:history.go(-1);">返回</a></FONT>

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧