<html>
    <head>
        <title>前端的base64使用方法</title>
    </head>
    <body>
    </body>
<script>
var str = "hello";
var str64 = window.btoa("hello");
console.log("字符串是:"+str);
console.log("经base64编码后:"+str64);
console.log("base64解码后:"+window.atob(str64));
</script>
</html>						上一篇:javascript - 实现jquery类似的$调用方法
讨论数量:0