Function vbs_escape(str)
dim i,c,a,r
'7个Escape无变化的特殊字符:*+-./@_
For i=1 to Len(str)
c=Mid(str,i,
1)
a=Asc(c)
If a>=0 AND a<=255 Then
If
a>=97 And a<=122 Then 'a-z
r=r & c
ElseIf a>=64 And a<=90 Then '@A-Z
r=r & c
ElseIf a>=45 And a<=57 Then '-./0-9
r=r & c
ElseIf a=42 or a=43 or a=95 Then '*+_
r=r & c
ElseIf a>15 Then
r=r & "%" & Hex(a)
Else
r=r & "%0" & Hex(a)
End If
Else
r=r & "%u" & Hex(AscW(c))
End If
Next
vbs_escape=r
End Function


 
目前有0条回应
Comment
Trackback
你目前的身份是游客,请输入昵称和电邮!