HLJ 发布于
2022-03-04 13:37:21

JavaScript btoa()函数对字符串编码

let str = "Hello People"
let encodedString = btoa(str)
console.log(encodedString) // "SGVsbG8gUGVvcGxl"

let dec = atob(encodedString)
console.log(dec) // "Hello People"
当前文章内容为原创转载请注明出处:http://www.good1230.com/detail/2022-03-04/579.html
最后生成于 2023-06-27 21:38:11
此内容有帮助 ?
0