get请求url传递中文参数
作者:互联网
url地址:其中参数data.recruitmentName为中文。
//使用encodeURI()进行二次编码
location.href = "http://localhost:8080/pages/manager/jobs_main.html?recruitmentId="+data.id+"&recruitmentName="+encodeURI(encodeURI(data.recruitmentName));
获取参数值:
//使用decodeURI进行解码
decodeURI(decodeURI(recruitmentName))
标签:recruitmentName,中文,decodeURI,get,url,data,encodeURI 来源: https://www.cnblogs.com/IamHzc/p/15397879.html