js传中文给java后台,乱码问题解决

var serchtext =  encodeURI($("#serch_text").val());
       serchtext = encodeURI(serchtext);

 

String query = r.getParameter("query");
query = URLDecoder.decode(query , "utf-8");

 

你可能感兴趣的:(js传中文给java后台,乱码问题解决)