asp獲取當前URL代碼實例

學識都 人氣:3.28W

asp獲取當前URL代碼

asp獲取當前URL代碼實例

asp並不像javascript那樣直接用函數取得當前url,以前天真的認爲asp沒有取得當前url的'方法。但最近發現,其實是可以的。 If LCase(erVariables("HTTPS")) = "off" Then

strTemp = ""

Else

strTemp = "https://"

End If

strTemp = strTemp & erVariables("SERVER_NAME")

If erVariables("SERVER_PORT") <> 80 Then

strTemp = strTemp & ":" & erVariables("SERVER_PORT")

end if