JS/Java 传递 中文参数

//js端需编码3次

filePath = encodeURIComponent(filePath);

filePath = encodeURIComponent(filePath);

filePath = encodeURIComponent(filePath);

//java端解码2次

queryString = URLDecoder.decode(queryString, "UTF-8");

queryString = URLDecoder.decode(queryString, "UTF-8");

猜你喜欢

转载自blog.csdn.net/tanzongbiao/article/details/82527699
今日推荐