[vb6.0/vba] htmlfile(MSHTML.HTMLDocument) 를 이용한 스크립트를 통한 encode / decode

하나를하더라도최선을 2023-03-11 08:43:55 29,591 0 0
Function encode(str)
    Set htmlfile = CreateObject("htmlfile")
    htmlfile.parentWindow.execScript "function encode(s) {return encodeURIComponent(s)}""jscript"
    encode = htmlfile.parentWindow.encode(str)
End Function
 
Function decode(str)
    Set htmlfile = CreateObject("htmlfile")
    htmlfile.parentWindow.execScript "function decode(s) {return decodeURIComponent(s)}""jscript"
    decode = htmlfile.parentWindow.decode(str)
End Function

댓글 0개

첫 번째 댓글을 작성해보세요!