asp獲取當前頁面url

<%
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()ip

%>
 
function getcenter(str,a,b)'str是字符串
  getcenter=split(split(str,a)(1),b)(0)
end function
Response.Write getcenter(GetLocationURL(),"=","")
相關文章
相關標籤/搜索