用JS完成Json数组Unicode转中文代码如下:
function decodeUnicode(str) {
str = str.replace(/\\/g, "%");
//转换中文
str = unescape(str);
//将其他受影响的转换回原来
str = str.replace(/%/g, "\\");
//对网址的链接进行处理
str = str.replace(/\\/g, "");
return str;
本文介绍了一种使用JavaScript处理JSON数组中Unicode编码的方法,通过定义decodeUnicode函数,能够将字符串中的Unicode编码转换为对应的中文字符,同时对网址链接进行特殊处理。
2774

被折叠的 条评论
为什么被折叠?



