地址栏的%20 如何转变为空格?

WEB8888 2005-09-16 08:42:07
地址栏的%20 如何转变为空格?
...全文
626 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
WEB8888 2005-09-16
  • 打赏
  • 举报
回复
我想知道类似这些是的原来内容 %E6%90%9CQ
coolstr 2005-09-16
  • 打赏
  • 举报
回复
自己会转,你不用理它,把它当成正常文字就可以了。
ttt2 2005-09-16
  • 打赏
  • 举报
回复
server.urlencode("sdfsd sdfsdf")
WEB8888 2005-09-16
  • 打赏
  • 举报
回复
%E6%90%9CQ
这样的呢?
ronakitty 2005-09-16
  • 打赏
  • 举报
回复
replace("%20"," ")
chengys 2005-09-16
  • 打赏
  • 举报
回复
UP
csdoc 2005-09-16
  • 打赏
  • 举报
回复
urlDecode函数

Function URLDecode(enStr)
dim deStr
dim c,i,v
deStr=""

for i=1 to len(enStr)
c=Mid(enStr,i,1)
if c="%" then
v=eval("&h"+Mid(enStr,i+1,2))
if v<128 then
deStr=deStr&chr(v)
i=i+2
else
if isvalidhex(mid(enstr,i,3)) then
if isvalidhex(mid(enstr,i+3,3)) then
v=eval("&h"+Mid(enStr,i+1,2)+Mid(enStr,i+4,2))
deStr=deStr&chr(v)
i=i+5
else
v=eval("&h"+Mid(enStr,i+1,2)+cstr(hex(asc(Mid(enStr,i+3,1)))))
deStr=deStr&chr(v)
i=i+3
end if
else
destr=destr&c
end if
end if
else
if c="+" then
deStr=deStr&" "
else
deStr=deStr&c
end if
end if
next

URLDecode=deStr
end function

function isvalidhex(str)
isvalidhex=true
str=ucase(str)
if len(str)<>3 then isvalidhex=false:exit function
if left(str,1)<>"%" then isvalidhex=false:exit function
c=mid(str,2,1)
if not (((c>="0") and (c<="9")) or ((c>="A") and (c<="Z"))) then isvalidhex=false:exit function
c=mid(str,3,1)
if not (((c>="0") and (c<="9")) or ((c>="A") and (c<="Z"))) then isvalidhex=false:exit function
end function

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧