asp獲取當(dāng)前URL
asp并不像javascript那樣直接用函數(shù)取得當(dāng)前url,以前天真的認(rèn)為asp沒有取得當(dāng)前url的方法。但最近發(fā)現(xiàn),其實是可以的。 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
更多信息請查看IT技術(shù)專欄