Loading

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))
posted @ 2021-10-12 14:48  IamHzc  阅读(789)  评论(0编辑  收藏  举报