当前位置:asp编程网>技术教程>Asp教程>  正文

获取本页的URL地址

2007-11-15 10:35:49   来源:网络    作者:佚名   浏览量:4341   收藏
<%
Function GetLocationURL() 
Dim Url 
Dim ServerPort,ServerName,ScriptName,QueryString 
ServerName = Request.ServerVariables("SERVER_NAME") 
ServerPort = Request.ServerVariables("SERVER_PORT") 
ScriptName = Request.ServerVariables("SCRIPT_NAME") 
QueryString = Request.ServerVariables("QUERY_STRING") 
Url="http://"&#38;ServerName 
If ServerPort <> "80" Then Url = Url &#38; ":" &#38; ServerPort 
Url=Url&#38;ScriptName 
If QueryString <>"" Then Url=Url&#38;"?"&#38; QueryString 
GetLocationURL=Url 
End Function 

Response.Write GetLocationURL()
%>

关于我们-广告合作-联系我们-积分规则-网站地图

Copyright(C)2013-2017版权所属asp编程网