国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

asp中獲取當前頁面的地址與參數(shù)的函數(shù)代碼

2024-05-04 11:08:24
字體:
來源:轉載
供稿:網友
asp中獲取當前頁面的地址與參數(shù)的函數(shù)代碼,經常需要用得到,特整理下,方便需要的朋友。
 
 
 
復制代碼代碼如下:

Function getCurrentUrl() 
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") 
end if 
strTemp = strTemp & Request.ServerVariables("URL") 
getCurrentUrl = strTemp 
End Function 

Function getUrlWithParams() 
Dim ScriptAddress,Servername,qs 
ScriptAddress = CStr(Request.ServerVariables("SCRIPT_NAME")) 
Servername = CStr(Request.ServerVariables("Server_Name")) 
qs=Request.QueryString 
If Request.ServerVariables("SERVER_PORT") <> 80 Then 
Servername = Servername & ":" & Request.ServerVariables("SERVER_PORT") 
end if 
if qs<>"" then 
getUrlWithParams ="http://"& Servername & ScriptAddress &"?"&qs 
else 
getUrlWithParams ="http://"& Servername & ScriptAddress 
end if 
End Function

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 苗栗市| 山东| 习水县| 佛坪县| 田林县| 集安市| 德兴市| 满洲里市| 宿州市| 曲麻莱县| 宜章县| 祁连县| 东明县| 翁牛特旗| 德庆县| 和顺县| 蕲春县| 民勤县| 阳春市| 景洪市| 应用必备| 灌阳县| 冕宁县| 木里| 曲靖市| 共和县| 阜南县| 工布江达县| 儋州市| 南漳县| 林口县| 荣昌县| 库车县| 衢州市| 衡水市| 兰州市| 顺义区| 左贡县| 山阳县| 太仓市| 财经|