---
title: "ajax传中文参数到后台乱码问题"
author: "beee"
date: "2014-03-17T14:34:21Z"
tags: []
categories: ["Web前端"]
slug: "ajax"
draft: false
lastmod: "2014-03-17T14:34:21Z"
id: 2032280
url: "https://beee.iteye.com/blog/2032280"
---

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

前台

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

后台

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