表单有中文后台乱码

表单含有中文提交后台乱码解决办法:

1.html 

 <head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>

2.服务端

   HttpServletRequest requet

   request.setCharacterEncoding("utf-8");

3.如果请求时get 请更换为post请求 

猜你喜欢

转载自tangzizi.iteye.com/blog/2307952