如何得到 url 的全部的值啊?

MarchSoft 2004-05-08 05:31:26
比如我的这张页面是 http://localhost:929/www/index.asp
我就要在index.asp页面中得到“http://localhost:929/www/index.asp”
显示在index.asp页面

如果是http://localhost:929又怎么样呢?

急急
...全文
55 11 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
cdsun 2004-05-09
  • 打赏
  • 举报
回复
怎么得不到呢?
yuehaiwuya 2004-05-09
  • 打赏
  • 举报
回复
可以的:
index.asp中:
  <script>

  this.location = "gourl.asp?url=" + this.location.href;

  </script>
在gourl.asp中处理url即可。
binghgo 2004-05-08
  • 打赏
  • 举报
回复
实现你的功能不难
上边的都可以
可是我的就不行了
比如
http://bbs.dz35.com/default.asp?action=gogogo
这个?action=gogogo是得不到的
stayhere 2004-05-08
  • 打赏
  • 举报
回复

<%

addr="http://" & request.servervariables("server_name")
addr= addr & ":" & request.servervariables("SERVER_PORT")
addr= addr & request.servervariables("url")
response.write addr

%>
qxg1123 2004-05-08
  • 打赏
  • 举报
回复
request.querystring就可以

上面的几种也可以
yymzzl 2004-05-08
  • 打赏
  • 举报
回复
也可以用javascript 中的location 得到
zql2008 2004-05-08
  • 打赏
  • 举报
回复
request.servervariable("http_url")
yymzzl 2004-05-08
  • 打赏
  • 举报
回复
<%=Request.ServerVariables("HTTP_REFERER")%>
AspDelphi 2004-05-08
  • 打赏
  • 举报
回复
Request.Servervariables("script_name")
lonelydreamsym 2004-05-08
  • 打赏
  • 举报
回复
楼上如是
dotnet东哥 2004-05-08
  • 打赏
  • 举报
回复
<%=Request.ServerVariables("HTTP_REFERER")%>

28,409

社区成员

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

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