當前位置:才華齋>設計>網頁設計>

asp獲取當前URL程式碼例項

網頁設計 閱讀(9.24K)

  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