编码解码 encodeURIComponent与decodeURIComponent (base64编码解码)btoa与atob

var test1="http://www.w3school.com.cn/My first/"

document.write(encodeURIComponent(test1)+ "<br />")
document.write(decodeURIComponent(test1))
var str = "RUNOOB";
var enc = window.btoa(str);
var dec = window.atob(enc);

 

posted @ 2021-03-10 16:43  玛卡巴鉲  阅读(574)  评论(0编辑  收藏  举报