JS传递:
function test(){
var test=$("#test").val();
windown.location.href='test.do?test='+test
}
controller接收加上:
String title=request.getParameter("test");
test=new String(test.getBytes("iso-8859-1"),"utf-8"); //解决url后中文乱码
这样就完美解决乱码问题;
JS传递:
function test(){
var test=$("#test").val();
windown.location.href='test.do?test='+test
}
controller接收加上:
String title=request.getParameter("test");
test=new String(test.getBytes("iso-8859-1"),"utf-8"); //解决url后中文乱码
这样就完美解决乱码问题;