标签:
JavaScript: window.self.location="searchbytext.action?searchtext="+encodeURIComponent(encodeURIComponent(seartext)); java: searchtext=java.net.URLDecoder.decode(searchtext,"UTF-8");/*需要处理异常*/ 另外还有一种方法是JavaScript进行一次编码,后台java处理时换种想法就好了: java代码: String s = new String(request.getParameter("name").getBytes("ISO8859-1"), "UTF-8");
标签:
原文地址:http://www.cnblogs.com/yaoyao66123/p/4773757.html