首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

GET模式传递中文参数乱码

2012-10-13 
GET方式传递中文参数乱码document.locationhttp://localhost:8080/css/AddStuInfoServlet?sname + enc

GET方式传递中文参数乱码

document.location="http://localhost:8080/css/AddStuInfoServlet?sname=" + encodeURIComponent (document.loginform.sname.value);


servlet中:String name= new String(request.getParameter("sname").getBytes("ISO-8859-1"),"UTF-8");

热点排行