var t=encodeURIComponent("孙毓波大好人");
alert("t1:"+t)
t = decodeURIComponent(t)
alert("t2:"+t)
=========================url乱码的解决方式================
function getUrlParam(url){
url = decodeURIComponent(url)
var location=url.indexOf('=');
if (location == -1)
return ;
//url=url.substring(aa+1);
return url.substring(location+1);
}
$(function () {
//在树的工具栏上显示下拉框
// showselect();
var url=window.location .href;
var cityName= getUrlParam(url);
alert("t1:"+t)
t = decodeURIComponent(t)
alert("t2:"+t)
=========================url乱码的解决方式================
function getUrlParam(url){
url = decodeURIComponent(url)
var location=url.indexOf('=');
if (location == -1)
return ;
//url=url.substring(aa+1);
return url.substring(location+1);
}
$(function () {
//在树的工具栏上显示下拉框
// showselect();
var url=window.location .href;
var cityName= getUrlParam(url);