js传参到servlet处理乱码方法: js处理: var doSome = document.getElementById(id).value; doSome = encodeURI(encodeURI(doSome)); servlet: String doSome=request.getParameter("doSome"); doSome = URLDecoder.decode(doSome, "UTF-8");