字符串转UTF-8码(%开头)

var str = '中';

var code = encodeURI(str);

console.log(code); // => %E4%B8%AD

posted on 2017-07-06 17:04  程序猿-alvin  阅读(312)  评论(0编辑  收藏  举报

导航