如何记住上一个页面

zhangzhexin_81 2005-09-12 04:03:47
在做asp时,有时用户闲逛到某个页面需要登陆才能继续浏览,这时用户登陆以后怎样回到刚才正在浏览的那个页面呢?
...全文
75 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
t7y7t 2005-09-13
  • 打赏
  • 举报
回复
每个页面上加入(除了login.asp)

reponse.cookie=thispage

============================================

login.asp

登陆成功后
if request("cookie")<>"" then 转到 request("cookie")

==============================================


'◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
'◆ ◆
'◆   定义本页面      ◆
'◆ ◆
'◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆

Function thispage()
thispage="http://"
thispage=thispage&Request.ServerVariables("SERVER_NAME")
if Request.ServerVariables("SERVER_PORT")<>80 then thispage=thispage&":"&Request.ServerVariables("SERVER_PORT")
if Request.ServerVariables("SCRIPT_NAME")<>"" then thispage=thispage&Request.ServerVariables("SCRIPT_NAME")
if Request.ServerVariables("QUERY_STRING")<>"" then thispage=thispage&"?"&Request.ServerVariables("QUERY_STRING")
end Function
qingxia 2005-09-12
  • 打赏
  • 举报
回复
<% Request.ServerVariables("HTTP_REFERER") %>
用这个获取,连接来路
-----------------------------
做个小广告,哈
比ie还要方便的收藏夹,仅需点两下鼠标
而且还能彻底解决重装系统或公共场合上网的问题
下载地址:华军软件园 http://www.onlinedown.net/soft/42309.htm
帮助文件:
http://www.itxinxi.com/help.shtml

如果本消息打扰了您,十分抱歉
3573745 2005-09-12
  • 打赏
  • 举报
回复
很多页面都有这个功能
你在本页面留一个变量 他的值就是 这个页面的名称(我也不确定有函数可以得到本页面么?)
然后每次转跳时带上这个参数就不得了

28,406

社区成员

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

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