URL传值中文乱码

时间:2021-05-02 19:10:00
url含有中文 先encodeURI(url)编码
获取之后再解码decodeURI

//加密

var param = "itname=" + slRows.ITNAME + "&orgname=" + slRows.ORGNAME + "&tqdesc=" + slRows.TQDESC + "&ipaname=";

window.open("/QuestionType/_QuestionDetailType?" + encodeURI(param), "newwindow", "height=700, width=1100, top=100, left=500, toolbar =no, menubar=no, scrollbars=no, resizable=no, location=0, status=no");

//解密

$(function () {
var sd = decodeURI(paramValue("itname")) + "--" + decodeURI(paramValue("orgname"));
alert("-0-0-" + sd);
});