[JavaScript] 日常填坑
作者:互联网
url传递中文参数乱码
/*解决方法:编码-->挂参传输-->解码*/ /*encodeURI*/ var url = contextPath+"/view/configure/rbacPermSelView?roleId=" + roleId+"&roleName="+encodeURI(encodeURI(roleName)); window.location = url; /*decodeURI*/ $('.module-name').text(decodeURI(pageHolder.basic.roleName)+"-权限配置");
标签:decodeURI,url,roleId,JavaScript,--,填坑,日常,roleName,encodeURI 来源: https://blog.51cto.com/u_15263565/2884906