asp获取当前完整路径(url)的函数代码(asp 获取td)这都可以

随心笔谈12个月前发布 admin
101 0


<%
function GetUrl()
on Error Resume Next
Dim strTemp
if LCase(request.ServerVariables(“HTTPS”))=”off” Then
strTemp=”http://”
Else
strTemp=”https://”
end if
strTemp=strTemp & Request.ServerVariables(“SERVER_NAME”)
if Request.ServerVariables(“SERVER_PORT”) <> 80 Then strTemp=strTemp & “:” & Request.ServerVariables(“SERVER_PORT”)
strTemp=strTemp & Request.ServerVariables(“URL”)
if trim(request.QueryString) <> “” Then strTemp=strTemp & “?” & Trim(Request.QueryString)
GetUrl=strTemp
End Function
response.write GetUrl()
%>

© 版权声明

相关文章