1、先在js中进行编码
var str = $("mytext").val(); //转码,两次 str = encodeURI(str); str = encodeURI(str); window.location = 'admin/reportQueryExcel.do?ruleText='+str;
2、action中进行解码
URLDecoder.decode(request.getParameter("ruleText"),"utf-8");
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/14258.html