asp獲取當(dāng)前URL代碼

字號(hào):


    asp獲取當(dāng)前URL
    asp并不像javascript那樣直接用函數(shù)取得當(dāng)前url,以前天真的認(rèn)為asp沒(méi)有取得當(dāng)前url的方法。但最近發(fā)現(xiàn),其實(shí)是可以的。 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")
    end if