如何用vbscipt实现javascript中的escape()和unescape()函数?

sbnth 2001-08-27 01:29:35
...全文
179 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
hydnoahark 2001-08-27
  • 打赏
  • 举报
回复
如果系统支持VBS的话,应该一定支持Javascript吧,在Javascript中用函数封装escape/unescape再直接在VBS调用不就行了
tripofdream 2001-08-27
  • 打赏
  • 举报
回复
escape():
server.urlencode()

upescape:
Function Decode(str)
x = InStr(str,"%")
Do While x > 0
Decode = Decode & Mid(str,1,x-1)
If LCase(Mid(str,x+1,1)) = "u" Then
'Response.Write "CHRW: " & "&H" & Mid(str,x+2,4) & "<br>"
Decode = Decode & ChrW(CLng("&H" & Mid(str,x+2,4)))
str = Mid(str,x+6)
Else
'Response.Write "CHR: " & "&H" & Mid(str,x+1,2) & "<br>"
Decode = Decode & Chr(CLng("&H" & Mid(str,x+1,2)))
str = Mid(str,x+3)
End If
x = InStr(str,"%")
Loop
Decode = Decode & str
End Function

28,406

社区成员

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

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