Public Function URLEncode(ByVal input_url As String) As String Dim count As Long Dim one_char As String URLEncode = "" For count = 1 To Len(input_url) one_char = Mid$(input_url,count,1) If InStr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",UCase$(one_char)) = 0 Then one_char = "%" & Right$("0" & Hex$(Asc(one_char)),2) End If URLEncode = URLEncode & one_char Next End Function原文链接:https://www.f2er.com/vb/259903.html