2020. 6. 30. 10:05

Private JSEngine As Object

 

Public Function URLEncode(ByVal value As String)

    If JSEngine Is Nothing Then SetJSEngine

    value = JSEngine.CodeObject.encodeURIComponent(value)

    value = Replace(value, "'""%27")

    URLEncode = Replace(value, """""%22")

End Function

 

Public Function UrlDecode(ByVal value As String)

    If JSEngine Is Nothing Then SetJSEngine

    value = Replace(value, "+"" ")

    UrlDecode = JSEngine.CodeObject.decodeURIComponent(value)

End Function

 

Private Sub SetJSEngine()

    Set JSEngine = CreateObject("MSScriptControl.ScriptControl")

    JSEngine.Language = "JScript"

End Sub

'vb6.0 & vba > vb6.0 & vba 자료' 카테고리의 다른 글

[vb6.0/vba/vb.net] 잡을수 있는 오류  (0) 2016.04.14

이 포스팅은 쿠팡 파트너스 활동으로, 일정액의 커미션을 제공받고 있습니다.


Posted by vbnvba