JS 链接里面有中文字符,出现乱码问题

	function GetIndexTheme(data) {
console.log("活动主题专区" + JSON.stringify(data))
if(data.Result == true) {
//alert(JSON.stringify(data));
for(var i = 0; i < data.Data.length; i++) {
var arr = '<img Keytitle="'+data.Data[i].Title+'" URLaddress="' + data.Data[i].URLaddress + '" Content_Id="' + data.Data[i].Content_Id + '" src="' + data.Data[i].PicURL + '"></div>';
var arr1 = '<div class="swiper-slide">' + arr + '</div>';
$('.zhutizhuanqu').append(arr1)
} $('.zhutizhuanqu img').click(function(){
var Content_Id = $(this).attr('Content_Id');
var Keytitle=$(this).attr('Keytitle');
//alert(Keytitle);----中文标题
ConsignorInfoArray = JSON.stringify(ConsignorInfoArray);
location.href ='html/classify/ProductByContent.html?Content_Id='+Content_Id+'&Keytitle='+Keytitle+'&ConsignorList='+ConsignorList.join(',')+'&ConsignorInfoArray='+ConsignorInfoArray; })
} else {
masksBoxFun('<span>' + data.Msg + '</span>');
}
} ---------------------------跳转的页面
----------接受传过来的字段,
function GetRequest() {
var url = decodeURI(location.search);
var theRequest = new Object();
if(url.indexOf("?") != -1) {
var str = url.substr(1);
var strs = new Array();
strs = str.split('&');
for(var i = 0; i < strs.length; i ++) { ----这一段就是
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
Content_Id = strs[0].split('=')[1];
Keytitle = strs[1].split('=')[1];
ConsignorList = strs[2].split('=')[1];
ConsignorInfoArray = strs[3].split('=')[1];
}
}
上一篇:JavaScript 权威指南第6版 - [阅读笔记]


下一篇:[ACM_动态规划] ZOJ 1425 Crossed Matchings(交叉最大匹配 动态规划)