JS传中文参数到ACTION 乱码问题
2012-10-17 18:14
381 查看
详见:http://topic.csdn.net/u/20080602/11/0edf10dd-8b67-4d3e-ad9d-ff022d397e0b.html
js编码
var comment = document.all.comment.value;
comment = encodeURI(encodeURI(comment));
action解码
try {
comment = java.net.URLDecoder.decode(comment, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
js编码
var comment = document.all.comment.value;
comment = encodeURI(encodeURI(comment));
action解码
try {
comment = java.net.URLDecoder.decode(comment, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
相关文章推荐
- 从js向Action传中文参数出现乱码问题的解决方法
- JavaScript跳转页面/Action并传递中文参数[解决js超链接传递过程中产生的中文乱码问题]
- 从js向Action传中文参数出现乱码问题的解决方法
- js传中文参数到action 乱码问题
- 从js向Action传中文参数出现乱码问题的解决方法
- 从js向Action传中文参数出现乱码问题的解决方法
- js,action,fusioncharts传参数中文乱码问题
- 从js向Action传中文参数出现乱码问题的解决方法
- 从js向Action传中文参数出现乱码问题的解决方法
- 解决JS传递中文参数乱码问题
- Js的Url中传递中文参数乱码,如何获取Url中参数问题
- JS中URL传中文参数引发的乱码问题
- js传中文参数到服务端变成乱码问题
- url 参数传递中文乱码问题 即<a href> 利用 js 的 encodeURI解决中文乱码问题
- JS URL传中文参数引发的乱码问题
- JSP、AJax中文乱码问题解决,escape(), encodeURI(), encodeURIComponent(),js对参数连续两次调用 encodeURI(String) 方法
- js 获取url 参数 中文乱码问题
- JS URL传中文参数引发的乱码问题
- JS URL传中文参数引发的乱码问题
- 解决JS在url中传递参数时参数包含中文乱码的问题