您的位置:首页 > 其它

前台后台中文乱码问题

2015-03-18 12:06 169 查看


前台JS:

var vtitle=$("#searchProgText").attr("value"); //中文参数
vtitle=encodeURI(encodeURI(vtitle)); //使用两次 encodeURI()

后台JAVA:

request部分
String title = request.getParameter("title"); //中文参数
title = URLDecoder.decode(title, "utf-8"); //转码

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: