ITeye博客

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

beee · 2014-03-17 14:34 · Web前端 · Markdown

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

前台

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

后台

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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。