ASP的解码函数
来源:互联网 发布:手机淘宝查看附近的人 编辑:程序博客网 时间:2024/06/07 02:15
server.URLEncode 相对应的函數
<script language="vbscript">
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
dim str
str= "http%3A%2F%2Ffree%2E21cn%2Ecom%2Fforum%2Fthread%2Ejsp%3Fforum%5Fid%3D621%26thread%5Fid%3D745761%26forum%5Fname%3D%26%23431%3BMM%26ispoll%3D0%26views%3D1236%26title%3D%26%23569%3B"
msgbox URLDecode(str)
</script
<script language="vbscript">
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
dim str
str= "http%3A%2F%2Ffree%2E21cn%2Ecom%2Fforum%2Fthread%2Ejsp%3Fforum%5Fid%3D621%26thread%5Fid%3D745761%26forum%5Fname%3D%26%23431%3BMM%26ispoll%3D0%26views%3D1236%26title%3D%26%23569%3B"
msgbox URLDecode(str)
</script
- ASP的解码函数
- ASP中的URLEncode的解码函数
- asp 编码解码函数
- Asp:base64编码、解码函数
- Asp:base64编码、解码函数
- ASP中实现的类似URLEncode的编码函数及对应解码函数
- ASP中实现的类似URLEncode的编码函数及对应解码函数
- Base64的编码解码函数
- base64编码解码的函数
- base64的编解码函数
- ASP用于BASE64的编解码
- asp的url编码和解码
- base64算发的解码函数
- ffmpeg h264实时解码用到的函数
- C#的base64编码、解码函数
- javascript中可用的编码解码函数
- C#的base64编码、解码函数
- asp URL解码 ASP网址解码
- Host '192.168.2.189' is not allowed to connect to this MySQL server
- 计算中缀表达式(实数,四则运算与括号)(双栈)
- Solaris的crontab
- Boost Graph Library 快速入门
- asp.net 使用自定义的错误页面
- ASP的解码函数
- Flash builder 4.5 安装 SVN插件
- MFC设置窗口背景颜色(很全很强大)
- S3C2440IIC中断方式
- 判断CDHtmlDialog 打开一个网址失败
- 关于Android锁屏的问题
- 窗口坐标统一问题
- 提取知识点 blt (signal ,Terminal shell 正则表达式)
- sqlite3 分页