仅支持浏览器端:
// 字符串编码
function encode (str) {
return window.btoa(encodeURIComponent(str))
}
// 字符串解码
function decode(str) {
return decodeURIComponent(atob(str))
}
console.log(encode('yangyingjie'))
仅支持浏览器端:
// 字符串编码
function encode (str) {
return window.btoa(encodeURIComponent(str))
}
// 字符串解码
function decode(str) {
return decodeURIComponent(atob(str))
}
console.log(encode('yangyingjie'))
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。