encodeURI

利用js的encodeURI()方法把数据转换成中文的编码

var str = "哈哈“
str:encodeURI(str)
console.log(encodeURI(str));

\\%E5%93%88%E5%93%88
 
然后用decodeURI()方法解码

 

posted @ 2020-06-23 19:24  兀笑  阅读(173)  评论(0)    收藏  举报