在 JavaScript 中,有两个原生支持的函数被分别用来处理解码和编码 Base64 字符串:
var str = 'eyJjb2RlIjoyMDAsIm1lc3NhZ2UiOiJPSyJ9' // base64字符串/ASCII字符 var data = atob(str) // {"code":200,"message":"OK"}
标签:编解码,binary,base64,js,var,atob,ASCII From: https://www.cnblogs.com/yourstars/p/17493596.html