본문 바로가기
카테고리 없음

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

by IT HUB 2023. 3. 11.
728x90
반응형
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

반응형

댓글