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

首頁 > 編程 > ASP > 正文

ASP讓url的中文顯示為編碼

2024-05-04 10:59:59
字體:
供稿:網(wǎng)友
asp解碼url
復(fù)制代碼 代碼如下:
<a href="1.asp?action=<%=server.urlencode("你好")%>">asdf</a>

解碼函數(shù)
[code]
<%
Function URLDecode(enStr)
dim deStr,strSpecial
dim c,i,v
deStr=""
strSpecial="!""#$%&'()*+,.-_/:;<=>?@[/]^`{|}~%"
for i=1 to len(enStr)
c=Mid(enStr,i,1)
if c="%" then
v=eval("&h"+Mid(enStr,i+1,2))
if inStr(strSpecial,chr(v))>0 then
deStr=deStr&chr(v)
i=i+2
else
v=eval("&h"+ Mid(enStr,i+1,2) + Mid(enStr,i+4,2))
deStr=deStr & chr(v)
i=i+5
end if
else
if c="+" then
deStr=deStr&" "
else
deStr=deStr&c
end if
end if
next
URLDecode=deStr
End function

response.Write URLDecode(request.QueryString("action"))
%>
[html]
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 晋江市| 土默特右旗| 兴宁市| 阿坝| 定襄县| 梨树县| 青铜峡市| 讷河市| 四平市| 太谷县| 滦平县| 宣化县| 洛浦县| 泾川县| 冕宁县| 星子县| 乌兰浩特市| 昌都县| 定西市| 太康县| 台北县| 威远县| 于田县| 贵德县| 吉林省| 招远市| 赣州市| 隆昌县| 察雅县| 钦州市| 澄迈县| 镇远县| 耒阳市| 桑植县| 濮阳市| 黄浦区| 枣阳市| 张家界市| 尼木县| 和静县| 尼木县|