ASP的escape和unescape函數(shù)
當(dāng)前位置:點(diǎn)晴教程→知識(shí)管理交流
→『 技術(shù)文檔交流 』
Function vbsEscape(str)
dim i,s,c,a s="" For i=1 to Len(str) c=Mid(str,i,1) a=ASCW(c) If (a>=48 and a<=57) or (a>=65 and a<=90) or (a>=97 and a<=122) Then s = s & c ElseIf InStr("@*_+-./",c)>0 Then s = s & c ElseIf a>0 and a<16 Then s = s & "%0" & Hex(a) ElseIf a>=16 and a<256 Then s = s & "%" & Hex(a) Else s = s & "%u" & Hex(a) End If Next vbsEscape = s End Function
Function vbsUnEscape(str) 該文章在 2015/1/7 23:43:12 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |