1. get方式
window.open 参数汉字乱码
window,open 为get方式提交参数
客户端
docName = encodeURI(docName);
docName = encodeURI(docName);
服务器端
docName = URLDecoder.decode(docName.trim(), "utf-8");
或者直接
String name = request.getParameter("name");//接收数据 name =new String(name.getBytes("ISO8859-1"), "UTF-8")
2. post方式
request.setCharacterEncoding("UTF-8");
时间: 2024-11-11 17:09:12