日期:2014-05-16  浏览次数:20776 次

ajax传中文参数到后台乱码问题

方法可能有好几种,自己mark一下自己用的

前台

window.location='/BillProductPreview.do?actiontype=AJAXOPENWORDFUND&file='+encodeURI(encodeURI(v_file));

后台

?String filepath=(String) request.getParameter("file");
?? filepath = URLDecoder.decode(filepath, "UTF-8");

?