关于JS编码问题

目前学习到这,有两个编码:

一,encodeURIComponent ,把中文变成不认识的代码

二,decodeURIComponent,把不认识的代码转成中文

 

如;

var str='你好';
document.write(encodeURIComponent(str));

posted @   jinzhu4147  阅读(116)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示