We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
atob() 和 btoa() 方法用于对字符串进行 base64 解码和编码,其中:
atob()
btoa()
window.atob('aGVsbG8gd29ybGQ=')
window.btoa('hello world')
它们 API 的命名颇具喜感,这里要注意 不要 把 atob 望文生义成 Any to Base64。可以这样来记忆: 字母 A 排在 字母 B 前面,所以 A 要比 B “高级”,A 就代表高级的 Base64,而 B 则代表普通的字符串。
atob
Any to Base64
A
B
The text was updated successfully, but these errors were encountered:
No branches or pull requests
atob()
和btoa()
方法用于对字符串进行 base64 解码和编码,其中:atob()
用于解码,例如:window.atob('aGVsbG8gd29ybGQ=')
btoa()
用于编码,例如:window.btoa('hello world')
它们 API 的命名颇具喜感,这里要注意 不要 把
atob
望文生义成Any to Base64
。可以这样来记忆:字母
A
排在 字母B
前面,所以A
要比B
“高级”,A
就代表高级的 Base64,而B
则代表普通的字符串。The text was updated successfully, but these errors were encountered: