//发出请求页面(编码 encodeURI)window.location.href="index.html?name="+encodeURI(encodeURI(name));//接受参数页面(解码 decodeURI)//获取URL地址参数function GetQueryString(name){ ???var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); ???var r = window.location.search.substr(1).match(reg); ???if(r!=null) ???????return ?unescape(r[2]); ???return null;}$(".head-title").text(decodeURI(decodeURI(GetQueryString(‘name‘))))
url传中文参数乱码问题
原文地址:https://www.cnblogs.com/dxt510/p/9149254.html