唐山网站建设

设为主页 加入收藏 繁體中文

自动获得当前页面URL的ASP函数

核心提示:自动获得当前页面URL的ASP函数

自动获得当前页面URL的ASP函数:


<%
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://"&ServerName
If ServerPort <> "80" Then Url = Url & ":" & ServerPort
Url=Url&ScriptName
If QueryString <>"" Then Url=Url&"?"& QueryString
GetLocationURL=Url
End Function
Response.Write GetLocationURL()
%>

http://www.fw8.net/
TAG:函数,页面
评论加载中...
内容:
评论者: 验证码: